The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have created a field parameter that calculates the average of one column each for 27 tables.
I want that average to be displayed on a card depending on which of the 27 units I pick on a slicer.
My problem: Whenever I add the card and put the field parameter in the Fields section of the visual, it automatically adds a filter on the card for the first measure in the field parameter and i cant remove it. Because of that, it only ever shows A01 (the first of the 27 units). When I click on my slicer and chose A02 the card switches to blank, even though the measure for A02 is included in the field parameter.
Solved! Go to Solution.
Hi @JanGunni ,
I suggest you to create a measure to achieve your goal.
In my sample there are five measures in it.
Average by Field Parameter =
VAR _ADD =
ADDCOLUMNS (
Parameter,
"Measure",
SWITCH (
[Parameter Order],
0, [Measure1],
1, [Measure2],
2, [Measure3],
3, [Measure4],
4, [Measure5]
)
)
RETURN
AVERAGEX ( _ADD, [Measure] )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @JanGunni ,
I suggest you to create a measure to achieve your goal.
In my sample there are five measures in it.
Average by Field Parameter =
VAR _ADD =
ADDCOLUMNS (
Parameter,
"Measure",
SWITCH (
[Parameter Order],
0, [Measure1],
1, [Measure2],
2, [Measure3],
3, [Measure4],
4, [Measure5]
)
)
RETURN
AVERAGEX ( _ADD, [Measure] )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I can only put one field into the card though, for example Total kWh for A01. How would the card pull data from the other 26 units?
Yes and if a text field is put into a card visual it will show either the first or last value of that field. If name and average value both are required to be displayed then use a multi-card visual.
@JanGunni Field parameter will contain the columns and will be a part of slicer. The card visual on the other hand will have the average measure as a field which will be filtered by the slicer on selection.