Forum Discussion

angelompcunha's avatar
angelompcunha
Frequent Visitor
5 years ago

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) :

 

When a day is selected (Partially working) :

 

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

  • 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])))

    • angelompcunha's avatar
      angelompcunha
      Frequent Visitor

      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

  • v-easonf-msft's avatar
    v-easonf-msft
    Icon for Community Support rankCommunity 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