QuestionQ112

VerifiedImplement and manage semantic models

You are designing a Fabric semantic model called Model1 for a financial analytics workspace. Model1 contains a DAX measure named Measure1 that returns total sales.

You have a table named Currency that includes a column named Format. The Format column specifies currency format strings for each record as follows: $#, ##0.00, €#, ##0.00, OR ¥#,##0.00.

You have a report that uses the Currency column to determine which symbol and format string to show. In the report, Measure1 must display two decimal places and the applicable currency symbol based on the value selected in the Currency column.

You create the following DAX formula.

FORMAT = SELECTEDVALUE( ‘Currency’ [Format])

You need to ensure that Measure displays correctly in visuals. The solution must minimize duplicated logic.

What should you do?

Explanation

A dynamic format string lets a model measure remain numeric while its displayed format changes with filter context. Setting Measure1’s dynamic format string to reference the FORMAT measure uses the selected Currency[Format] value, producing the appropriate currency symbol and two-decimal format without duplicating the SELECTEDVALUE expression. Create dynamic format strings for measures

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!