Forum Discussion
Temp table inside measure
Anonymous , Not ver clear .
Last three month with date table and time intelligence
example
Rolling 3 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(Sales[Sales Date]),-3,MONTH))
Rolling 3 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX(Sales[Sales Date]),-3,MONTH))
Days in this month
Days in this month = day(eomonth(today(),0) )
Days in this month = day(eomonth(max(Table[Date]),0) )
TIll this date
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
MTD Days= CALCULATE(count(Date[Date]),DATESMTD('Date'[Date]))
or
MTD Days= CALCULATE(distinctcount(Date[Date]),DATESMTD('Date'[Date]))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
Appreciate your Kudos.
- Anonymous6 years agoNot applicable
Sorry, I didn't explain myself properly.
This helps me as well, but my main issue is
as seen on example, "Measure 7" is what I want to have as KPI, overall one.
But as this only aggregates tables, I have issue to get total value correct.
Instead of total leads*CR
I would like to see there 25.6+390.55+691.78+43.99 which is 1152,
- Anonymous6 years agoNot applicable
Solved!
Seems like my problem was, that I was putting variables outside of SUMX iterator
as explained here https://community.powerbi.com/t5/Desktop/DAX-Using-variables-inside-iterators-such-as-SUMX/td-p/521044