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,
how to calculate the previous 6 months' sale by selecting a month from the slicer.
if I select November then the visual will show June to November sale
if I select august then the visual will show march to august sale
thanks
Solved! Go to Solution.
Sorry, it is my mistake. actually i am considering the end of month for the start date and didnt consider the entire month. for eg. if i select Sep-2021 it takes the 30-Apr-2021 as a start date but it should be 01-Apr-2021.
So, can you please correct the Start_Date measure as below,
Hi,
If you dont select any month then it will take the very recent month automatically and give you the last 6 months data from the recent month
If you select Dec month then it will give you last 6 months data from Dec
Hi @abc_777 ,
Create an independent slicer table as below.
month = DISTINCT('Table'[date].[MonthNo])
Then create a measure and add it to visual filter.
Measure =
var _month = month(SELECTEDVALUE('Table'[date]))
var _slicer = SELECTEDVALUE('month'[MonthNo])
return
IF(_month<=_slicer&&_month>=_slicer-5,1,0)
Best Regards,
Jay
hi thanks for reply
here I have create but there is something wrong please help
Hi @abc_777 ,
May I ask where is the problem? In the screenshot you have selected July in the slicer so the value from February to July is 1. Do you want each month only appear once in the visual?
If so, you could modify the measure as below:
Measure =
var _month = SELECTEDVALUE('Table'[date].[MonthNo])
var _slicer = SELECTEDVALUE('month'[MonthNo])
return
IF(_month<=_slicer&&_month>=_slicer-5,1,0)
Then use month hierarchy in the visual.
The result before applying the filter:
Best Regards,
Jay
@abc_777 , You need an independent date table for that
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
hi @amitchandak ,
I have tried the youtube link you gave. thanks for that but really unlucky. if you could help me out.
hi,
does anyone have any suggestions? not last 6 months but I will select say july then from july previous 6 months
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 |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
129 | |
106 | |
106 | |
86 | |
72 |