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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Dax Calculate + filter doesn't show correctly on visual

Hi everyone,

 

Here is my dax code:

 

measure =
CALCULATE(
 SUM(Table1[Hours])
 ,FILTER(Table1, Table1[Float_Category] = MIN(Table1[Float_Category]))
 )

 

In the calculation, I already filtered table to show only the min value of [Float_Category]. But when I put the measure into a table or visual, all [Float_Category] values showed up.

Capture.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Can anyone help this.

 

Thanks,
JS

4 REPLIES 4
RoRo
Regular Visitor

Hello,maybe the following code will help you :

measure =
CALCULATE(
 SUM(Table1[Hours])
 ,FILTER(Table1, Table1[Float_Category] = MIN(ALL(Table1[Float_Category])))
 )

CahabaData
Memorable Member
Memorable Member

air code

 

measure =
CALCULATE(
  SUM(Table1[Hours]),
     FILTER( ALLSELECTED (Table1),

        Table1[Float_Category] = MIN(Table1[Float_Category]) ) )

 

www.CahabaData.com
Anonymous
Not applicable

Hi @CahabaData

 

I have tried your code, still, doesn't work. 

If i put this measure into a "Card" visual, it showed correctly. 

But once i plot it on a "column chart", it showed everything. I was expecting to see only (x=0, y=200)

 

Seems that column chart type is overwriting the "Filter" function.

Capture.JPG

 

 

given the table data of your first post where each category has 100 hours; what is the correct Measure value for categories 0, 1 and 5?

www.CahabaData.com

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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