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.
I created a measure in which i calculated an indicator and now i want that indicator to be accumulated.
Solved! Go to Solution.
Hi @Anonymous ,
Refer:
Measure = SUMX(FILTER(ALLSELECTED('Table'),'Table'[yearmonth]<=MAX('Table'[yearmonth])),[ind_rotacion])
Best Regards,
Jay
Hey @Anonymous ,
I think an approach like the following should work:
ind_rotacion_TD =
VAR rota_colab =
CALCULATE (
SUM ( ROTACION[ROTACION] ),
DATESBETWEEN (
myDateTable,
FIRSTDATE ( ALL ( myDateTable[Date] ) ),
LASTDATE ( myDateTable[Date] )
)
)
VAR totalcolaborador =
CALCULATE (
COUNT ( 'BD Consolidado'[Contrato] ),
DATESBETWEEN (
myDateTable,
FIRSTDATE ( ALL ( myDateTable[Date] ) ),
LASTDATE ( myDateTable[Date] )
)
)
RETURN
DIVIDE ( rota_colab, totalcolaborador )
Hi @Anonymous ,
Refer:
Measure = SUMX(FILTER(ALLSELECTED('Table'),'Table'[yearmonth]<=MAX('Table'[yearmonth])),[ind_rotacion])
Best Regards,
Jay
Thank you so much for your reply jay,
when i used this solution the result i get is the accumulative sum of the rotation, even when i am summing the measure ind_rotation
@Anonymous ,
I presume you mean accumulated over time, in which case you can use functions like DATESYTD, TOTALYTD as long as you've got a correctly set-up calendar table.
Pete
Proud to be a Datanaut!
Hey @Anonymous ,
can you give more details?
Accumulated by what? By time? By year? By product?
Best regards
Denis
Hey Denis (@selimovd),
Thank you for your time, I'm acummulating by time it's a monthly indicator and i have the date, and a colum for the month and year!
This is the measure i'm using and i need to acummulate the result it gives me :
Hey @Anonymous ,
I think an approach like the following should work:
ind_rotacion_TD =
VAR rota_colab =
CALCULATE (
SUM ( ROTACION[ROTACION] ),
DATESBETWEEN (
myDateTable,
FIRSTDATE ( ALL ( myDateTable[Date] ) ),
LASTDATE ( myDateTable[Date] )
)
)
VAR totalcolaborador =
CALCULATE (
COUNT ( 'BD Consolidado'[Contrato] ),
DATESBETWEEN (
myDateTable,
FIRSTDATE ( ALL ( myDateTable[Date] ) ),
LASTDATE ( myDateTable[Date] )
)
)
RETURN
DIVIDE ( rota_colab, totalcolaborador )
Thank you so much for your answer,
When i used your solution i did not get the correct result. Attached you may find a table with a column in green with the result i need and in yellow with the result i'm getting
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 |
---|---|
111 | |
95 | |
77 | |
68 | |
54 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |