Forum Discussion
Tomas_Seig
3 years agoFrequent Visitor
Dynamic format measures in subtitles
Hi all!
Thanks in advance for your time.
I have encountered a rather small issue, but one non the less. It seems that when I include a dynamically formatted measure in another measure for the subtitle of a visual, the format does not go with it. I suppose it is because the format of the measure for subtitle must be a text.
Example:
DELIVERY_COST_PT = DIVIDE([DELIVERY_COST], SUM('FT_LOADINGS_BI'[SUPPLIER_WEIGHT_TNS]))
Format:
SWITCH(TRUE(),
[CURRENCY_SELECTED] = "EUR", "#,##0.00 €;- #,##0.00 €; #,#00.00 €",
[CURRENCY_SELECTED] = "CHF", "#,##0.00 fr;- #,##0.00 fr; #,#00.00 fr",
[CURRENCY_SELECTED] = "GBP", "#,##0.00 £;- #,##0.00 £; #,#00.00 £",
[CURRENCY_SELECTED] = "USD", "#,##0.00 $;- #,##0.00 $; #,#00.00 $")
SUBTITLE_DELI_COST_PT = "DELIVERY COSTS PT: " & [DELIVERY_COST_PT]
Any idea if there is a way to make this work, other than creating a third measure for the formatting?
Thanks again.
Tomas
1 Reply
- Tomas_SeigFrequent Visitor
Nevermind guys, I knew it was a silly question. Just in case anyone is interested, I solved it by adding the dynamic format of the DELIVERY_COST_PT inside the subtitle measure:
SUBTITLE_DELI_COST_PT = "DELIVERY COSTS PT: " &SWITCH(TRUE(),[CURRENCY_SELECTED] = "EUR", FORMAT([DELIVERY_COST_PT], "#,##0.00 €;- #,##0.00 €; #,#00.00 €"),[CURRENCY_SELECTED] = "CHF", FORMAT([DELIVERY_COST_PT], "#,##0.00 fr;- #,##0.00 fr; #,#00.00 fr"),[CURRENCY_SELECTED] = "GBP", FORMAT([DELIVERY_COST_PT], "#,##0.00 £;- #,##0.00 £; #,#00.00 £"),[CURRENCY_SELECTED] = "USD", FORMAT([DELIVERY_COST_PT], "#,##0.00 $;- #,##0.00 $; #,#00.00 $"))