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
Sam-L
Frequent Visitor

Percentage betweent data in two cards which pulls from the same field (one filtered, one unfiltered)

Hello,

 

I'm trying to create a card that displays a percentage value between two cards, which pull from the same data field. The two cards show an overall total of data (which doesn't filter) and a total after filtering which filters based on various slicers.

 

Obviously the second card will change when filters are applied, but the first stays static.

Sam-L_0-1619798288407.png

 

Sam-L_1-1619798301379.png

 

Does anyone know of a way to display this?

 

Thank you!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Sam-L ,

Measures

with Filter

M1= count(Table[Mission_accept])

 

Without filter 

M2 = calculate(count(Table[Mission_accept]), all(Table))

 

 

percent = divide([M1], [M2])

View solution in original post

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

Hi  @Sam-L  ,

I created the data:

v-yangliu-msft_0-1620116359961.png

Here are the steps you can follow:

1. Create measure.

Measure = SUM('Table'[amount])
Measure 2 =
SUMX(ALL('Table'),'Table'[amount])

The effect of the ALL() function is not affected by the slicer, so of the two cards, one is affected and the other is not.

2. Select Date as the slicer, measure and measure2 as card

3. Select the Text box in Insert to create a text box

v-yangliu-msft_1-1620116359967.png

4. Result:

When the slicer is selected, measure changes, but measure2 does not change

v-yangliu-msft_2-1620116359970.png

 

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.

amitchandak
Super User
Super User

@Sam-L ,

Measures

with Filter

M1= count(Table[Mission_accept])

 

Without filter 

M2 = calculate(count(Table[Mission_accept]), all(Table))

 

 

percent = divide([M1], [M2])

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.