Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Remove rows based on ifelse statement in Dax

I am trying to create a measure to prevent double counting. The dax code below works fine unless [LC or USD] = "USD". I need to remove the rows when [LC or USD] = "USD" holds. How to get around with this? Many thanks in advance.

`MyBase = SUM('MyData'[Amount])`


 MyCalculate = 
    CALCULATE(    
        [MyBase],
        KEEPFILTERS('MyData'[Currency] = "USD"),
        KEEPFILTERS('MyData'[Scenario] = "AOP")
    
        )

MyData

MyData
    LC or USD     Currency Amount
    LC               USD      1
    LC               USD      1
    LC               USD      1
    USD              USD      1
    USD              USD      1
    USD              USD      1
    LC               EUR      1

Expected Result

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

 MyData
        LC or USD     Currency Amount
        LC               USD      1
        LC               USD      1
        LC               USD      1
        LC               EUR      1

>Solution :

Try this:

Measure = [MyBase](FILTER(MyData, MyData[LC or USD] <> "USD"))

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading