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!