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
angelompcunha
Frequent Visitor

Problems with DAX Formula for measure

Hello everyone,

 

I'm not much experienced with DAX and got stuck trying to perform one calculation.

I'm using a funnel visual to display the ranking of tickets raised by user. What I want to do is if nothing is selected in other visuals, to show the ranking of tickets raised today, otherwise to show the ranking of tickets raised on the selected day.

I've managed to build the following DAX formula which is displaying correctly the ranking for today but when I select a specific day in the visual from the left, it does show the correct count of Incident ID but does not update the list of names of the users in the funnel

Nothing selected (Working OK) :

angelompcunha_0-1614949468401.png

 

When a day is selected (Partially working) :

angelompcunha_1-1614949558100.png

 

the formula I'm using in the measure that I use in the funnel is the following: 

Ranking by Day = IF(NOT(ISFILTERED('Date Table'[Date])),CALCULATE(COUNT('Data Table'[Incident ID]),'Date Table'[Date]=TODAY()),CALCULATE(COUNT('Data Table'[Incident ID]),VALUES('Date Table'[Date].[Date])))
 
What am I doing wrong? I'm particularly confused because the count of incidents is updating correctly but the users list is still showing only the ones for today instead of the selected day
3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi, @angelompcunha 

If you create a date slicer  and select a specific day  to filter the data,what is the result it shows?

If it is convenient, please share a sample file for testing.

 

Best Regards,
Community Support Team _ Eason

amitchandak
Super User
Super User

@angelompcunha , Date is already filtered in else just try to use count

 

Ranking by Day = IF(NOT(ISFILTERED('Date Table'[Date])),CALCULATE(COUNT('Data Table'[Incident ID]),'Date Table'[Date]=TODAY()),CALCULATE(COUNT('Data Table'[Incident ID])))

I still got the same behaviour when using that formula. The count of incidents does update correctly for each user but the actual user list does not change.
I have the feeling that I'll need to create a second measure to place it in the Group section of the funnel which would apply the same logic as the Ranking by Day but instead would return the list of users for the day selected but i'm not entirely sure if that is the way

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.