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.
Hi @all,
Please let me know if I can make changes to the currency only for few values in a column.
For Example: If the type is Quantity then Value is 39. If the Type is Dollar then value is $540.
Type | Value |
Quantity | 39 |
Dollar | $540 |
Let me know with the possiblity. Thanks in advance.
Solved! Go to Solution.
@Anonymous
you can duplicate the measure and format each accordingly using the formatting options under "Measures tools" in the ribbon. Then use SWITCH to deliver the required output:
Measure format = SWITCH(TRUE(),
SELECTEDVALUE(table column [type]) = "Quantity", [number formatted measure],
[dollar formatted measure])
Proud to be a Super User!
Paul on Linkedin.
@Anonymous
you can duplicate the measure and format each accordingly using the formatting options under "Measures tools" in the ribbon. Then use SWITCH to deliver the required output:
Measure format = SWITCH(TRUE(),
SELECTEDVALUE(table column [type]) = "Quantity", [number formatted measure],
[dollar formatted measure])
Proud to be a Super User!
Paul on Linkedin.
Hi @PaulDBrown ,
Can I fix the Decimal point to 2 in the in the Format with Currency ?
Currently it is not showing the decimal point as underlined with red in above screenshot.
@Anonymous
Sure. Select the measure, got to "Measure tools" in the ribbon and in the box for decimals in the formatting section type in 2.
Proud to be a Super User!
Paul on Linkedin.
@PaulDBrown ,
I had did that but it works for quantity value.
It is not working on format $
@Anonymous
Make sure the field/value is formatted as "None" under "Display Units" in the formatting pane.
Proud to be a Super User!
Paul on Linkedin.
Hi @PaulDBrown ,
Yes The Display units is "None" in field formating. I see there is no 2 decimal points in your visual under Sum of Target column.
@Anonymous
Sorry, I should have clarified... I live in a land where the thousands seperator is defined by a " ." and the decimals by a " , " (so you can see there are indeed two decimal places in the values under sum of target).
So I'm not sure what is going on at your end. I take it the column itself is actually a number format (not "general" or "text")
Proud to be a Super User!
Paul on Linkedin.
Thanks for clarifying about seperator @PaulDBrown .
Seperator for Thousands here is " , " and decimal is " . " so I was confused in checking that.
Hi @Anonymous ,
You can create a calculated column but this will return a text and cannot be summed up.
Calculated Column =
IF (
'Table'[Type] = "Quantity",
FORMAT ( 'Table'[Value], "#,#" ),
IF ( 'Table'[Type] = "Dollar", FORMAT ( 'Table'[Value], "$#,#" ) )
)
Alternatively, you can instead use a measure to aggregate Value and then format it:
Measure =
VAR __VALUE =
SUM ( 'Table'[Value] )
VAR __TYPE =
//there must be a single selected value in the current filter context or this will return a blank result
SELECTEDVALUE ( 'Table'[Type] )
RETURN
IF (
__TYPE = "Quantity",
FORMAT ( __VALUE, "#,#" ),
IF ( __TYPE = "Dollar", FORMAT ( __VALUE, "$#,#" ) )
Proud to be a Super User!
Hi @danextian ,
Thanks for the reply. I tried using the below and shows the error in the screenshot. Can you help me with that ?
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 |
---|---|
98 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |