Forum Discussion
compare results
Hello All, i have been working on as task and finally decided to ask it here as this forum has been very helpful to me lately.
Is there a way in PowerBI to compare the results of previous month dashboard to current month dashboard and provide the difference? I have a dashboard wghich is refreshed every month to find out the difference in numbers of certain dataset
Thanks in advance
Hi Anonymous
Create two new table
calendar1 = ADDCOLUMNS(CALENDARAUTO(),"year",YEAR([Date]),"month",MONTH([Date])) calendar2 = ADDCOLUMNS(CALENDARAUTO(),"year",YEAR([Date]),"month",MONTH([Date]))
Create relationships as below
Create measures in Sheet2
sales = SUM(Sheet2[value]) previous sales = CALCULATE([sales],ALL(calendar1),USERELATIONSHIP(calendar1[Date],calendar2[Date])) difference = [sales]-[previous sales]
Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- v-juanli-msftCommunity Support
Hi Anonymous
Does your dataset refresh every month so that it updates to the lastest month's data, drop the previous months' data?
situation1:
If so, Power BI doesn't support to store previous data after refreshing.
situation2:
If after refreshing, your data source can hold both previous data and lastest month' data,
it should be possible to achieve your requirement.
For any details to the solution, please ensure which situation you meet.
Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- AnonymousNot applicable
Hey Maggie, my task falls in Situation2.
I have a column of month in dataset. so the solution would look something like: Two Slicer visuals which will both have a month column and adjacent to that will be a Card visual which will show the difference between two month. for example: i select Dec from one Slicer and Jan from another Slicer then the visual should show the difference of count between two months
- AnonymousNot applicable
Can anyone help to solve this?