Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

DAX - FILTER ALL based on the other measure

Hi,

I have a Power BI report based on the Tabular SSAS.

There is the following dimenstion table:

ColumnA  | Column B              

Europe      | E

Asia          |  A

America    |  A

America    |  AT

 

Report has only one slicer (ColumnA).

I need to create a measure based on the fact table which works according to the following:

  • If I select value in the slicer calculate value based on the Column B ( select America which has (A, AT) display value for Asia and America because Asia has also 'A' in the Column B).

Measure works fine :

Measure 2 = CALCULATE(Measure 1,
FILTER(ALL('Table'), 'Table'[Column B] IN VALUES('Table'[Column B])))
 

The issue is that I would like to set additional filter on the column B and calculate only for those values when the other measure is greater or equal 1.

I've tried but it does not work:

Measure2 = CALCULATE(Measure1,
FILTER(ALL('Table'), 'Table'[Column B] IN VALUES('Table'[Column B])&& Measure3>=1))
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try like

 

Measure2 = CALCULATE(Measure1,
FILTER(VALUES('Table'[Column B]), [Measure3]>=1))

 

or

 

Measure2 = CALCULATE(Measure1,
FILTER(VALUES('Table'[Column B]), [Measure3]>=1), All(Table) )

 

I am not sure on the need of 'Table'[Column B] IN VALUES('Table'[Column B])  , from same table

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try like

 

Measure2 = CALCULATE(Measure1,
FILTER(VALUES('Table'[Column B]), [Measure3]>=1))

 

or

 

Measure2 = CALCULATE(Measure1,
FILTER(VALUES('Table'[Column B]), [Measure3]>=1), All(Table) )

 

I am not sure on the need of 'Table'[Column B] IN VALUES('Table'[Column B])  , from same table

Anonymous
Not applicable

Thanks a lot, it works ! 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.