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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AmineGatou
Frequent Visitor

Filter Card using Categorical measures

Hey everyone, I've been stuck on this problem for quite a while now.

I have created a table named "KPI" containing these values. ( These values are the expected result of a certain measure)

AmineGatou_0-1648568875547.png

So that I can filter my data using it.

AmineGatou_1-1648568939401.png

As you can see here, The table is filtered no problem, but the cards are not! For example the " Nb Client Sur N" count the number of clients. But it still returns the whole count of the data and not 3 ( in this example) 

Any idea how to achieve that?

4 REPLIES 4
Arul
Super User
Super User

Hi @AmineGatou ,

 

Do you have relationship enabled between the client data table and KPI table?

 

Thanks,

-Arul





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

Proud to be a Super User!


LinkedIn


Hi arul, no there is no relationship beetween them , since the KPI table only have two columns the KPI'S one has values that are expected to be returned from a measure ( Find it below)

 

DiagArticleCA N/N-1 = if(and([LYTotCA]<=0,[TotCA]>0),"NEW",if(and([LYTotCA]>0,[TotCA]<=0),"LOST",if(and(and([LYTotCA]>0,[TotCA]>0),([LYTotCA]>[TotCA])),"DEC",if(and(and([LYTotCA]>0,[TotCA]>0),([LYTotCA]<[TotCA])),"INC","STB"))))

 

I'm really stuck on this.

Hi @AmineGatou ,

 

Please ellaborate your expectation more in detail. So that i can try to figure out a way to help.

 

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


AmineGatou_0-1648631674806.png

All right the idea is to filter my data using the "diag YTD/Y-1" measure and its formula is : 

------------

if(and([LYTotCA]<=0,[TotCA]>0),"NEW",if(and([LYTotCA]>0,[TotCA]<=0),"LOST",if(and(and([LYTotCA]>0,[TotCA]>0),([LYTotCA]>[TotCA])),"DEC",if(and(and([LYTotCA]>0,[TotCA]>0),([LYTotCA]<[TotCA])),"INC","STB"))))

----------------------

So I got the idea to create a table named "KPI" that contains all the values possible of the measure as rows. Then I created another measure that compare the Selected value from the KPI table and the value of DiagYTD/Y-1 Measure, this way my table was filtered but the cards don't filter. So I need a solution to filter those cards as well. 

I hope everything's clear now.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.