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

Total Multiple Filtered Measures

Hello,

I have the following Dax Statement below that is creating a score for two filtered measures and adding the score together. 

 

 

 

Measure =
CALCULATE (
    DISTINCTCOUNT ( 'Table'[case] ),
    FILTER ( ALLSELECTED ( 'Table' ), 'Table'[date] >= EDATE ( TODAY (), -12 ) )
) * 20
    + CALCULATE (
        DISTINCTCOUNT ( 'Table'[case] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[date] >= EDATE ( TODAY (), -60 ) )
    ) * 5

 

 

 

I now just want to add another filtered measure to the total but i dont need it to look back a year. I just need the measure to be filtered by specific value or category of the values if that makes since? Because if i use a slicer it will scew the actual measure up and filter the data as a whole rather than the specific information i need.

Below i have attatched the visuals as well. The total i am trying to reach is 70. Right now i have just the admissions added together with the dax i provided above. For instance for this next added part of the measure i am looking for if a case has a waiver of ABC then create a score of 20. I then would like to add that to the other dax i have above creating a total score of 70.

Example2.PNG

Any help would be greatly appreciated as i am not finding much on creating a totaled filtered measure.

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply. Here is what i ended up using.

 

CALCULATE(DISTINCTCOUNT('Admissions'[admDate]), FILTER(ALLSELECTED('Admissions'), Admissions[admDate]>=EDATE(TODAY(), -12)))*20 +
CALCULATE(DISTINCTCOUNT('Admissions'[admDate]), FILTER(ALLSELECTED('Admissions'),'Admissions'[admDate]>=EDATE(TODAY(),-60)))*5 +
CALCULATE('Waiver'[Waiver Score], FILTER(ALL('Waiver'[Waiver Description ]), 'Waiver'[Waiver Description] = "Waiver 01"))
 
This seemed to work very well. I was able to add a filter onto the waiver (Waiver 01) and add it as a total to the other measures.

View solution in original post

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

Sorry we cannot understand your requirement clearly, but it seems you want te sum up [Measure] and [Waiver] and get the result of 70? Try to add the [Waiver Score] should get the desire result:

 

Measure =
CALCULATE (
    DISTINCTCOUNT ( 'Table'[case] ),
    FILTER ( ALLSELECTED ( 'Table' ), 'Table'[date] >= EDATE ( TODAY (), -12 ) )
) * 20
    + CALCULATE (
        DISTINCTCOUNT ( 'Table'[case] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[date] >= EDATE ( TODAY (), -60 ) )
    ) * 5
        + [Waiver Score]

 


If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks for the reply. Here is what i ended up using.

 

CALCULATE(DISTINCTCOUNT('Admissions'[admDate]), FILTER(ALLSELECTED('Admissions'), Admissions[admDate]>=EDATE(TODAY(), -12)))*20 +
CALCULATE(DISTINCTCOUNT('Admissions'[admDate]), FILTER(ALLSELECTED('Admissions'),'Admissions'[admDate]>=EDATE(TODAY(),-60)))*5 +
CALCULATE('Waiver'[Waiver Score], FILTER(ALL('Waiver'[Waiver Description ]), 'Waiver'[Waiver Description] = "Waiver 01"))
 
This seemed to work very well. I was able to add a filter onto the waiver (Waiver 01) and add it as a total to the other measures.

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.