cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dblowers
Regular Visitor

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

dblowers
Regular Visitor

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 Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Kudoed Authors