Forum Discussion
sirramzy
9 years agoFrequent Visitor
KPI Measure - Monthly Comparison
Hi All, Beginner to Power Bi, been using it for a few weeks now. Got a prett basic query. I'll call my fact table as 'Customer Registration Table' which has the following fields Registra...
cs_skit
9 years agoResolver IV
You could do calculated fields in your Calendar table like "Year Month Int" with values like 201706
And a measures in Calendar table ThisMonth and LastMonth
having that makes it easier then you can do
TestMeasure = COUNTROWS(FILTER(ALL('Table');RELATED(Calendar[YearMonthInt])=[ThisMonth]))
Having some measures and calc fields for custom time intelligence makes other DAX easier and you can even easily reuse it between projets. Especially important when you have finance data with Fiscal Years and all that but even helpful with normal time specific data.
there is a nice function here http://databear.com/2016/11/08/power-bi-tip-dynamic-calendar-table/ that I use as basis for my calendar table it already comes with some good stuff