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,
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
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 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |