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

Trouble formatting currency from SSAS Tabular

We're using Azure SSAS Tabular and PowerBI Pro Desktop.
From what I can see, the formatting options are not available in PB in this scenario since they are greyed out.
This means my formatting has to happen on the SSAS side.


My problem is formatting currency and percentages on the SSAS side seems to make my measures act like string data and it does not recognize it in a way where formating can manipulate it as a currency value.
On the front PB side, that means I cannot utilize options in the visuals to auto display the values or even set the number of decimals that the value displays, whether it has a $ sign, or wha the units of display will be.


I have tried different methods below but they return a value either without the $ sign or with a $ sign that cannot be formatted on the front end using the Data Label/Number of Decimals or the Unit Display settings,,,, note that the column "Revenue" shows up in the SSAS model with all values having a $ sign in front of it - hence currency.

 

YTD Revenue:=]
CALCULATE(SUM('Transactions'[Revenue]),
Transactions[CurrentYear] = 1 )

 

YTD Revenue:=
Format(CALCULATE(SUM('Transactions'[Revenue]),
Transactions[CurrentYear] = 1 ),"Currency")

 

YTD Revenue:=
Currency(CALCULATE(SUM('Transactions'[Revenue]),
Transactions[CurrentYear] = 1 ))

 

Oddly,  HERE I have a similar formula that works just find and allows me to change the number of decimals and display units in the Data Label settings:


Previous Year Previous:=
CALCULATE(SUM('Transactions'[Revenue]),
Transactions[CurrentYear] = 2 )

 

- Am I correct that I cannot format this on the PowerBI side because we are using SSAS Tabular and NOT importing the data into the report?
- How can I format the YTD Revenue measure on the SSAS side so that I can show the $ sign and format the Decimals and Display Units in the Data Value options?
- Why does one formula format correctly and not the other? Or am I totally missing something?

1 ACCEPTED SOLUTION
daxer
Solution Sage
Solution Sage

As far as I remember, measures developed in SSAS should be formatted in there. I've done it countless times and it worked even in Tableau. But when I say "formatted" I don't mean using FORMAT to format the raw number.  I mean doing it in the UI, or - if you feel adventurous - in the .bim file straight in the JSON. Eeach measure has properties, the formatting string is among them.

View solution in original post

2 REPLIES 2
daxer
Solution Sage
Solution Sage

As far as I remember, measures developed in SSAS should be formatted in there. I've done it countless times and it worked even in Tableau. But when I say "formatted" I don't mean using FORMAT to format the raw number.  I mean doing it in the UI, or - if you feel adventurous - in the .bim file straight in the JSON. Eeach measure has properties, the formatting string is among them.

View solution in original post

What I found was that on the SSAS tabular side, the "Properties Window" for the formula is the correct place where the data type can be designated (percent, currency, text, etc).  Rather than trying to "Format" the output withing the formula with a typing function, setting the properties of the output to a particular type still allows for some minimal control on the PowerBI side for decimal places, Display Units under the data label settings, etc.

Thaks for the clue!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors