Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 217117

How can i Format the value?

$
0
0

Following this article:
https://community.powerbi.com/t5/Desktop/How-to-change-measure-value-using-parameters/td-p/46011

Variable Calculation =
VAR Costs =
    SUM ( Sales[Cost] ) //Change with your measure 

VAR Quantitys =
    SUM ( Sales[Quantity] ) //Change with your measure 

VAR Weights =
    SUM ( Sales[Weight] ) //Change with your measure 

VAR SelectMeasure =
    MIN ( CalculationTable[SortID] )

RETURN
    IF (
        HASONEVALUE ( CalculationTable[Calculation Name] );
        
               SWITCH ( SelectMeasure; 
                                            1; Costs;
                                            2; Quantitys; 
                                            3; Weights 
                               )
    )



And how can i format those values in the DAX return?


Example:
50

IF the choice is Price, the value must be seen with brazilian coin format (R$ 50,00).
IF the choice is Quantity, the value must be seen like 50,00
IF the choice is weight, the value must be seen like 50,0000

How can i do that?

Thank's for all!


Viewing all articles
Browse latest Browse all 217117

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>