Forum Discussion

cristianml's avatar
cristianml
Post Prodigy
6 years ago

Dax Average calculation - data filtered in Pivot Table

Hi,

 

I have an issue with one of my measures that is not showing the correct Average in the Pivot Table. If you see in the screenshot below, the measure Rate Card Value should show 86 instead of 97. I need to modify this measure so It can show the correct average that is 86 in the Total of column of the Pivot Table :

 

This is the measure that I need to MODIFY so it can show the correct average. But at the same time I need to Keep "Blank()" if in the other table where comes the measure "Actual LCR" is blank too.

Rate Card Value=AVERAGEX(Rate_Card_Table, IF([Actual LCR]=BLANK(), BLANK(),Rate_Card_Table[Rate Card Value]))

 

 

Any ideas,? Thanks!

 

 

 

 

6 Replies

  • az38's avatar
    az38
    Community Champion

    hi cristianml 

    without full data model I could only suggest 2 p=issues:

    first, correct compare with blank as

    Rate Card Value=AVERAGEX(Rate_Card_Table, IF(ISBLANK([Actual LCR]), BLANK(),Rate_Card_Table[Rate Card Value]))

    second, replace blank() to 0

    Rate Card Value=AVERAGEX(Rate_Card_Table, IF(ISBLANK([Actual LCR]), 0,Rate_Card_Table[Rate Card Value]))

    do not hesitate to give a kudo to useful posts and mark solutions as solution

     

      • az38's avatar
        az38
        Community Champion

        cristianml 

        Measures_RT_Actual is disconnected from other data models

        whats statement defines [Actual LCR] measure?

        do not hesitate to give a kudo to useful posts and mark solutions as solution