cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
doveShampoo
Frequent Visitor

How do I show a card value based off a slicer from a different table?

9.png

In the attached image, the visual I am having trouble with is the card at the bottom.
This card is meant to show the month with the highest energy consumption. I have disabled the month slicer's (at the top) interaction with the card. The only thing affecting the card should be the year slicer (at the top left). So for 2020, It should show January instead of April. 

The Month data is from the energy_consumption table, and the year slicer is from the contracted_capacity table. 

Any suggestions? Thanks

1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi @doveShampoo 

You can create a measure, and put the measure to the card

Measure = var a=ADDCOLUMNS(ALL(energy_consumption),"month",energy_consumption[Date].[Month])
var b=SUMMARIZE(a,[Year],[month],"sum",SUM(energy_consumption[energy_consumption]))
var c=MAXX(FILTER(b,[Year] in VALUES(contracted_capacity[Year])),[sum])
return MAXX(FILTER(b,[Year] in VALUES(contracted_capacity[Year])&&[sum]=c),[month])

Output

vxinruzhumsft_0-1684292349363.png

 

Best Regards!

Yolo Zhu

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

1 REPLY 1
v-xinruzhu-msft
Community Support
Community Support

Hi @doveShampoo 

You can create a measure, and put the measure to the card

Measure = var a=ADDCOLUMNS(ALL(energy_consumption),"month",energy_consumption[Date].[Month])
var b=SUMMARIZE(a,[Year],[month],"sum",SUM(energy_consumption[energy_consumption]))
var c=MAXX(FILTER(b,[Year] in VALUES(contracted_capacity[Year])),[sum])
return MAXX(FILTER(b,[Year] in VALUES(contracted_capacity[Year])&&[sum]=c),[month])

Output

vxinruzhumsft_0-1684292349363.png

 

Best Regards!

Yolo Zhu

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

 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors