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
Niiru1
Helper V
Helper V

Additional Filter to text and calculation measure

I'm currently trying to add an additional filter to my measure which I'm using in a card. The measure contains both calculations and text:
 
Title A = 
"Number of Events (N= " &
CALCULATE(IF(CALCULATE(COUNT('Sheet1'[Event Identifier])=BLANK()),0,CALCULATE(COUNT('Sheet1'[Event Identifier])))
,FILTER('Sheet1','Sheet1'[Location] in {"Hospital"})) & ")"
 
 
What I'm trying to do is add an additional filter  to only contain values for weeks 16 and above e.g.
Title A =
"Number of Events (N= " & CALCULATE(CALCULATE(IF(CALCULATE(COUNT('Sheet1'[Event Identifier])=BLANK()),0,CALCULATE(COUNT('Sheet1'[Event Identifier]))),FILTER('Sheet1','Sheet1'[Location] in {"Hospital"})),FILTER('Sheet1','Sheet1'[Outbreak Week] >= {"32"})) & ")"
 
Is this possible via DAX?
 
File attached:
Thanks in advance
1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Niiru1   ,

Here are the steps you can follow:

1. Create measure.

Title A =
"Number of Events (N= " & CALCULATE(IF(CALCULATE(COUNT('Sheet1'[Event Identifier])=BLANK()),0,CALCULATE(COUNT('Sheet1'[Event Identifier]))),FILTER('Sheet1','Sheet1'[Location] in {"Hospital"}&&'Sheet1'[Outbreak Week]>=16)) & ")"

2. Result

v-yangliu-msft_0-1607475927472.png

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @Niiru1   ,

Here are the steps you can follow:

1. Create measure.

Title A =
"Number of Events (N= " & CALCULATE(IF(CALCULATE(COUNT('Sheet1'[Event Identifier])=BLANK()),0,CALCULATE(COUNT('Sheet1'[Event Identifier]))),FILTER('Sheet1','Sheet1'[Location] in {"Hospital"}&&'Sheet1'[Outbreak Week]>=16)) & ")"

2. Result

v-yangliu-msft_0-1607475927472.png

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Top Solution Authors