Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi, I have a chart as follow:
The data is loaded from 4 columns in a table: Date, Additional Cost, Trip Rate, and kg. I created a measure for each of the cost.
What I'm trying to do is create a cost card that change when clicking on the legend (Total cost when none is selected, or only additional cost/trip rate).
Your help would be greatly appreciated.
Solved! Go to Solution.
Hi @Anonymous ,
You cannot do this directly you need to do a workaround:
Measure |
Total Cost |
Trip Rate |
Now do the following measure:
Selection Measure = SWITCH(SELECTEDVALUE('Legend_Table'[Measure]);"Trip Rate";[Trip rate measure];"Total Cost";[Total cost measure];[Total cost measure])
Now create your chart in the following way:
For your card you just need to add the Selection Measure and everything will work accordingly.
Check a PBIX file, altough the axis is a category works the same for dates.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
You cannot do this directly you need to do a workaround:
Measure |
Total Cost |
Trip Rate |
Now do the following measure:
Selection Measure = SWITCH(SELECTEDVALUE('Legend_Table'[Measure]);"Trip Rate";[Trip rate measure];"Total Cost";[Total cost measure];[Total cost measure])
Now create your chart in the following way:
For your card you just need to add the Selection Measure and everything will work accordingly.
Check a PBIX file, altough the axis is a category works the same for dates.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThis is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
75 | |
68 | |
41 | |
35 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |