cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
admiralman Member
Member

Formatting Measures

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.

5 REPLIES 5
Super User
Super User

Re: Formatting Measures

Sample data would help, but it seems like the default Currency format would work. And that will not impact other calculations.


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

admiralman Member
Member

Re: Formatting Measures

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. 

Rfranca Member
Member

Re: Formatting Measures

hi, @admiralman @Greg_Deckler

 

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

 

admiralman Member
Member

Re: Formatting Measures

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.

Rfranca Member
Member

Re: Formatting Measures

hi, @admiralman

 

sorry for the inconvenience

 

Have you tried this?

Power KPI Matrix - Microsoft Corporation

 

Best Regards,
Rfranca

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 371 members 4,215 guests
Please welcome our newest community members: