cancel
Showing results for
Did you mean:

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

Frequent Visitor

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

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
Community Support

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

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.

Community Support

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

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.

Announcements

#### Power BI Monthly Update - November 2023

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

#### Fabric Community News unified experience

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

#### 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!

#### 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