Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I am trying to use the previous month function to grab the Sum, Count and CountRows just to try all the options here. Previosuly I was summing aggregates of transactions. Now I have a denormalized table and am trying to count the rows of the table instead to work out the values.
For some reason, I am not getting anything consistenatly returned from the below:
I have two reports that are identical from what I can see, containing the 3 measures below:
Sum Previous = CALCULATE(SUM('Test Data'[Value]) + Sum('Test Data'[Custom]), PREVIOUSMONTH('Test Data'[Date]))
CountRows Previous = CALCULATE(COUNTROWS('Test Data') + COUNTROWS('Test Data'), PREVIOUSMONTH('Dates'[Date]))
Count Previous = CALCULATE(COUNT('Test Data'[Value]) + COUNT('Test Data'[Custom]), PREVIOUSMONTH('Dates'[Date]))
In Report Test the Previous Month function works with Sum. But not with Count or CountRows.
In Report Test 2 the Previous Month function works with Count and CountRows. But not with Sum.
What is going on? It seems like a bug. But I may have missed something.
Further to this, when working with a date table, should my date key always be converable to a date, I have been given a new date data set and the PK is now an ID rather than convertable to date in PowerBI. As seen in Contoso Sales Sample.
Regards,
Hi @DanielClark,
Would you please share the .pbix file which has 'Test Data' and 'Dates' tables for our analysis?
Best Regards,
Qiuyun Yu
What is the best way to share them as I do not seem to be able to attach files to posts.
Regards,
Hi @DanielClark,
You can upload files to OneDirve or Dropbox then share the link here.
Best Regards,
Qiuyun Yu
Hi @v-qiuyu-msft,
Sorry for the delay; Here are the files: https://1drv.ms/f/s!AhNB5S6yOcRppif1mUg6jqJfySmj
Regards,
Daniel Clark
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |