Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Quiero aprender a escribir código dax de dos maneras (Columna calculada y Medida)
para formular total por "PriodID" y "Ratio"
Solved! Go to Solution.
Hola @MrDarian ,
Comprobar
Measure 1 = CALCULATE(SUM('Table'[Indicator]),ALLEXCEPT('Table','Table'[PeriodID]))
Measure 2 = SELECTEDVALUE('Table'[Indicator])/[Measure 1]
Column 1 = CALCULATE(SUM('Table'[Indicator]),ALLEXCEPT('Table','Table'[PeriodID]))
Column 2 = 'Table'[Indicator]/'Table'[Column 1]
Saludos
Jay
Hola @MrDarian ,
Comprobar
Measure 1 = CALCULATE(SUM('Table'[Indicator]),ALLEXCEPT('Table','Table'[PeriodID]))
Measure 2 = SELECTEDVALUE('Table'[Indicator])/[Measure 1]
Column 1 = CALCULATE(SUM('Table'[Indicator]),ALLEXCEPT('Table','Table'[PeriodID]))
Column 2 = 'Table'[Indicator]/'Table'[Column 1]
Saludos
Jay
Hola @MrDarian :
PFB Columna y medida calculadas:
CalculatedColumnSum = CALCULATE(SUM('Table'[Indicator]),ALLEXCEPT('Table','Table'[PeriodID]))
CalculatedColumRatio =
Var _IndicatorByPeriod= CALCULATE(SUM('Table'[Indicator]),ALLEXCEPT('Table','Table'[PeriodID]))
Var _Result= DIVIDE('Table'[Indicator],_IndicatorByPeriod,0)
Return
_Result
MeasureSum = CALCULATE(SUM('Table'[Indicator]),ALLEXCEPT('Table','Table'[PeriodID]))
MeasureRatio = DIVIDE(SUMX(FILTER('Table','Table'[PeriodID]=MAX('Table'[PeriodID])),'Table'[Indicator]),[MeasureSum],0)
¡Gracias!
Tratar
Nueva columna: divide([indicator], sumx(filter(table,[PriodID] á earlier([PriodID])),[indicador]))
Nueva medida: divide(sum([indicator]), sumx(filter(allselected(table),[PriodID] á Max([PriodID])),[indicador]))
Nueva medida: divide(sum([indicator]), sumx(filter(table),[PriodID] á Max([PriodID])),[indicador]))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |