Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone,
In a project i would like to use different mesure in a single one but i have some difficulties to do it.
For exemple in my dataset i have 4 mesure CA and UC in decimal and DN and DV in percentage. I created a new table KPI list with my KPI name and a column order.
I would like to calculate a new mesure KPI selected :
The point is to have a segment KPI list and when i select CA or UC my bar chart use the KPI selected and he is in decimal and when i select DN or DV the barchart is now in percentage.
Is this possible ?
Thank you
Solved! Go to Solution.
Hi @Anonymous ,
Thanks @bhanu_gautam for the quick reply and solution. You can place the measure provided by @bhanu_gautam on the data label of the column chart.
Or we can create dynamic format strings for measure.
Create dynamic format strings for measures in Power BI Desktop - Power BI | Microsoft Learn
KPI selected =
VAR SelectedKPI = SELECTEDVALUE('KPI list'[Order])
RETURN
SWITCH(
SelectedKPI,
1,[CA],
2,[UC],
3,[DN],
4,[DV]
)
SWITCH(SELECTEDVALUE('KPI list'[Order]),
1,"0.00",
2,"0.00",
3,"0.00%",
4,"0.00%")
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Thanks @bhanu_gautam for the quick reply and solution. You can place the measure provided by @bhanu_gautam on the data label of the column chart.
Or we can create dynamic format strings for measure.
Create dynamic format strings for measures in Power BI Desktop - Power BI | Microsoft Learn
KPI selected =
VAR SelectedKPI = SELECTEDVALUE('KPI list'[Order])
RETURN
SWITCH(
SelectedKPI,
1,[CA],
2,[UC],
3,[DN],
4,[DV]
)
SWITCH(SELECTEDVALUE('KPI list'[Order]),
1,"0.00",
2,"0.00",
3,"0.00%",
4,"0.00%")
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Try using below measure
KPI selected formatted =
VAR SelectedKPI = SELECTEDVALUE('KPI list'[Order])
RETURN
SWITCH(
SelectedKPI,
1, FORMAT([CA], "0.00"),
2, FORMAT([UC], "0.00"),
3, FORMAT([DN], "0.00%"),
4, FORMAT([DV], "0.00%")
)
Proud to be a Super User! |
|
Hello, i have already tried to do this and it works in table and matrix but when it's in graph i can't use it because power bi think the mesure is a format text
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |