Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a measure...call it Current Year Actuals that I need formatted "$#,##0;($#,##0)" and a Budget measure formatted the same way. I have accomplished this and it appears perfectly on the report. However, I need to use these measures in another measure "(Current Year - Budget) / Budget" within a calculation. I receive an error saying it cannot convert the value of type text to type number. I could create the new measure by repeating the same calculations as I did in each base measure but that seems so redundant. Is there not any way to use the base measures and still have them formatted the way I want? Thanks in advance.
Sample data would help, but it seems like the default Currency format would work. And that will not impact other calculations.
Let's assume that the default formats don't satisfy my needs. I need manual formatting control over the measure(s) but still need them to calculate when used for other measures.
COME ON.....
1. Create a table named DM_INDICADOR, in this table it will record the measurements that you want to use in your panels, it must have 2 fields: DM_INDICADOR [ID_INDICADOR], DM_INDICADOR [NAME_INDICADOR]. You can use Excel to mount the table.
2. Record the measurements you will use, such as 1; SLI_VOLUME; 2; SLI_GROSSSALES; 3; SLI_NETSALES; 4; SLI_GROSSPRICE etc.
3. Import this table and create a filter;
4. For each registered measure you must create the respective measure / calculation with the same name of course.
5. Create a measure to identify which measure you are going to consult.
Indicador_Selected =
IF(HASONEVALUE(dm_INDICADOR[NOME_INDICADOR]);
SWITCH(VALUES(dm_INDICADOR[ID_INDICADOR]);
1; [SLI_VOLUME]; 2;[SLI_GROSSSALES];3; [SLI_NETSALES];4;[SLI_GROSSPRICE];5;[SLI_NETPRICE];
6; [SLI_NETCOGS];7; [SLI_MARGIM_PERCENT];8;[SLI_TAXPRICE]
); 0)
6. Create a measure to identify the formatting that you will use in the selected bookmark.
Indicador_Format =
IF(HASONEVALUE(dm_INDICADOR[NOME_INDICADOR]);
SWITCH(VALUES(dm_INDICADOR[ID_INDICADOR]);
1; "#.###"; 2;"#,###.00";3; "#,###.00";4;"#,###.00";5;"#,###.00";
6; "#,###.00";7; "0.00%";8;"0.00%"); "#.###")
7. Create the measure that you have chosen and you will present it in the tables or graphs of the panels.
XIndicator = FORMAT ([Indicator_Selected]; [Indicator_Format])
Ready!
Please try and test using it. And please mark the right reply as answer if your issue has been resolved, otherwise, please feel free to ask if you have any other issue.
Best Regards,
Rfranca
thanks but I dont think that will work for me. I need all three measures in a matrix and cannot use a filter to pick and choose which one to show.
hi, @admiralman
sorry for the inconvenience
Have you tried this?
Power KPI Matrix - Microsoft Corporation
Best Regards,
Rfranca
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |