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.
Hi everyone,
Can you please help me with a measure that calculates using the following logic?
I dont necessary needs a specific month as the example, Id like to show the data in a Table using the months/quarters/years from a Calendar Table where I can see the % of projects that starts in one month and ends in another one!
Thank you!
Solved! Go to Solution.
Hi @Anonymous ,
You can create a measure as below:
Measure =
VAR _cursdate=MAX('Table'[Fecha Inicio])
VAR _startinsmonth= CALCULATE(DISTINCTCOUNT('Table'[ID Actividad]),FILTER('Table', MONTH('Table'[Fecha Inicio])=MONTH(_cursdate)))
VAR _startendnotinsmonth = CALCULATE(DISTINCTCOUNT('Table'[ID Actividad]),FILTER('Table', MONTH('Table'[Fecha Inicio])=MONTH(_cursdate)&&MONTH('Table'[Fecha Fin])<>MONTH(_cursdate)))
RETURN
DIVIDE(_startendnotinsmonth,_startinsmonth)
Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.
Hi @Anonymous ,
You can create a measure as below:
Measure =
VAR _cursdate=MAX('Table'[Fecha Inicio])
VAR _startinsmonth= CALCULATE(DISTINCTCOUNT('Table'[ID Actividad]),FILTER('Table', MONTH('Table'[Fecha Inicio])=MONTH(_cursdate)))
VAR _startendnotinsmonth = CALCULATE(DISTINCTCOUNT('Table'[ID Actividad]),FILTER('Table', MONTH('Table'[Fecha Inicio])=MONTH(_cursdate)&&MONTH('Table'[Fecha Fin])<>MONTH(_cursdate)))
RETURN
DIVIDE(_startendnotinsmonth,_startinsmonth)
Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.
@Anonymous , Try measures like
% ended in same Month = divide(countx(filter(Table, eomonth([start date],0)= eomonth([end date],0)),Table[Task]), count(Table[Task]))
% ended in different Month = divide(countx(filter(Table, eomonth([start date],0)= eomonth([end date],0)),Table[Task]), count(Table[Task]))
I tried with your measures and worked in some way, now it is giving me the right result, however if I list the tasks on a table, it is not showing me the ones that were not completed the same month, only the ones that did.
This is the data model, maybe you can have a better idea with this
https://1drv.ms/x/s!Ag7DnkvMsR95szrMjdViLqwnK5NT?e=FQZdMw
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |