Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Card Visual (Measure with Distinct Count)

Hi all,

I need some help creating a measure for a card that call outs Regions in Red. There are only 7 Regions, so the maximum would be 7. Right now, the measure I have created sums up everything that is in Red. In the example below, my Card says there are 7 Regions in Red (7 red icons). This is incorrect. I need it to say 6 Regions in Red with no duplicates of the regions. I basically need a distinct count of the Regions in Red which I am having trouble figuring out how to add to my measure. For reference, Metric 1 and Metric 2 are in seperate tables.

I have tried multiple ways to get what I want, but I'm having trouble. If anyone has any guidance for me, that'd be great.

 forum.PNG

 

 

 

 

 

 

 

 

 

 

 

Here's my measure for the card so far:

AFF_RED =
VAR Metric 1_RED = COUNTROWS(FILTER(SUMMARIZE(
'Metric 1', 'Metric 1[Region],"Metric 1", SUM('Metric 1'[Average_Days_COL])), [Average_Days]>33))
VAR Metric 2_RED = COUNTROWS(FILTER(SUMMARIZE(
'Metric 2','Metric 2[Region],"Metric 2",SUM('Metric 2'[Rate_COL])),[Rate]>1))
VAR REGIONS_RED = Metric 1_RED + Metric 2_RED
RETURN IF(ISBLANK(REGIONS_RED),0,REGIONS_RED)
9 REPLIES 9
Anonymous
Not applicable

HI @Anonymous,

Did these replies help you requirement? If this is a case, you can consider accepting the suitable one as solution to help other users who have the same requirement.
If not, you can feel free to post detailed information to help us clarify your scenario.

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi all,

I need some help creating a measure for a card that call outs Regions in Red. There are only 7 Regions, so the maximum would be 7. Right now, the measure I have created sums up everything that is in Red. In the example below, my Card says there are 7 Regions in Red (7 red icons). This is incorrect. I need it to say 6 Regions in Red with no duplicates of the regions. I basically need a distinct count of the Regions in Red which I am having trouble figuring out how to add to my measure. For reference, Metric 1 and Metric 2 are in seperate tables.

I have tried multiple ways to get what I want, but I'm having trouble. If anyone has any guidance for me, that'd be great.

forum.PNG

Here's my measure for the card so far:

AFF_RED =
VAR Metric 1_RED = COUNTROWS(FILTER(SUMMARIZE(
'Metric 1', 'Metric 1[Region],"Metric 1", SUM('Metric 1'[Average_Days_COL])), [Average_Days]>33))
VAR Metric 2_RED = COUNTROWS(FILTER(SUMMARIZE(
'Metric 2','Metric 2[Region],"Metric 2",SUM('Metric 2'[Rate_COL])),[Rate]>1))
VAR REGIONS_RED = Metric 1_RED + Metric 2_RED
RETURN IF(ISBLANK(REGIONS_RED),0,REGIONS_RED)

Believe this post is repeated with the one below:

 

https://community.powerbi.com/t5/Desktop/Card-Visual-Measure-with-Distinct-Count/m-p/1405570


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

@amitchandak I'm curious if you might have some input you could give me. I'd appreciate any help.

@Anonymous , If REGIONS_RED  giving blank then count with values should count red region 

 

AFF_RED =
VAR Metric 1_RED = COUNTROWS(FILTER(SUMMARIZE(
'Metric 1', 'Metric 1'[Region],"Metric 1", SUM('Metric 1'[Average_Days_COL])), [Average_Days]>33))
VAR Metric 2_RED = COUNTROWS(FILTER(SUMMARIZE(
'Metric 2','Metric 2'[Region],"Metric 2",SUM('Metric 2'[Rate_COL])),[Rate]>1))
VAR REGIONS_RED = Metric 1_RED + Metric 2_RED
RETURN

countx( values('Metric 1'[Region]),REGIONS_RED)

 

or

 

RETURN

countx( summarize('Metric 1', 'Metric 1'[Region],"_1",[REGIONS_RED]),[_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
PaulDBrown
Community Champion
Community Champion

@Anonymous 

Can you please provide a dummy dataset or PBIX file to play around with? 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

Here is the sample data I used. 

 

forum.PNG

As well as that measure for the card:

RED =
VAR METRIC_1 =
COUNTROWS(
FILTER(
SUMMARIZE(
'Metric 1', 'Metric 1'[Region],"1", SUM('Metric 1'[AVG])), [AVG_MEASURE]<=.75))
VAR METRIC_2 =
COUNTROWS(
FILTER(
SUMMARIZE(
'Metric 2','Metric 2'[Region],"2",SUM('Metric 2'[AVG_2])),'Metric 2'[AVG_MEASURE2]<=.75))
VAR GRIDS_RED = METRIC_1 + METRIC_2
RETURN IF(ISBLANK(GRIDS_RED),0,GRIDS_RED)

 

Anonymous
Not applicable

Hi Paul,

Thanks for your willingness to help. I create a sample power bi. How should I send it? I'm not able to attach onto here. 

@Anonymous 

You can upload the file to a cloud service (Onedrive, Google Drive, Dropbox...) and share the file from there. 
Alternatively you can post sample data in a table format here (not as an image please) so we can copy it and work on a solution.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors