Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I would like to display a quantity measure with a To/kg toggle which would convert the measure accordingly and matches the following behaviour.
1. When displayed in To, the measure should display 3 decimals but when displayed in Kg it should show 0 decimals. I think this can be easily achieved with the FIXED function.
Fixed function w/ comma = SWITCH(TRUE(), UoM[UoM selected]="KG", FIXED([Quantity in UoM], 0, 0), UoM[UoM selected]="TO", FIXED([Quantity in UoM], 3, 0), "")
2. When displayed on a US internet browser, the measure should have comma as thousands separator and a dot as a decimal separator, This is is exactly what the FIXED function do!.
However when displayed on a European internet browser, the measure shoudl have a blank as thousands separator and a comma as a decimal separator, Unfortunately it seems that the FIXED function doesn't adapt automatically to the browser local setting.
A work around would be to define another measure to substitute the separators like so:
Fixed function w/ comma substitute = SWITCH(TRUE(), UoM[UoM selected]="KG", SUBSTITUTE(SUBSTITUTE(FIXED([Quantity in UoM], 0, 0), ",", " "), ".", ","), UoM[UoM selected]="TO", SUBSTITUTE(SUBSTITUTE(FIXED([Quantity in UoM], 3, 0), ",", " "), ".", ","), "") Then create a US/EU toggle to let the user switch between the display format.
Although it "works" I am quite reluctant to go this way because it means more heavier dax code and also have the user toggle the display themselves.
I have also played with the FORMAT function and the predefined numeric formats but none of them are making the grade.
Any suggestion would be greatly appreciated.
https://drive.google.com/open?id=1Wat69FyvwTzcfhRSanNo9eTlMqQTFlmy
Best regards
Hi @Maikeru,
Based on my test, it is not possbile to achieve your gola by browser regional configuration . You can come up a new idea about that and add your comments there to improve Power BI and make this feature coming sooner.
https://ideas.powerbi.com/forums/265200-power-bi-ideas
Regards,
Frank
Hi Frank,
Thank you very much for having taken the time to look into this issue.
Best regards
Michael
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |