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.
Hello,
I was looking for last dates for each month sales based on selection of single sliicer. I serached and found out a video linked and picture are attached below where on single selection it shows last 6 months of slicer month sales.
https://www.sqlbi.com/articles/show-previous-6-months-of-data-from-single-slicer-selection/
but I want only last date sales for each month instead of whole month. For example when the user selects '2021-11-20', we want to see the dates of '2021-10-30', '2021-09-29', '2021-08-30' etc ...
Is it possible?
Kindly help.
Thanks
Solved! Go to Solution.
Hi, @Hamdan1234 ;
You could create a another table then create a measure .
1.create a table as slicer, and don't create a relationship.
slicer = SUMMARIZE('Table',[Date],"year-month",FORMAT([Date],"mmmm yyyy"))
2.create a measure.
CumProduction =
CALCULATE (
SUM ( 'Table'[Production] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Location] ),
[Months Producing] <= MAX ( 'Table'[Months Producing] )
)
)
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Hamdan1234 ;
You could create a another table then create a measure .
1.create a table as slicer, and don't create a relationship.
slicer = SUMMARIZE('Table',[Date],"year-month",FORMAT([Date],"mmmm yyyy"))
2.create a measure.
CumProduction =
CALCULATE (
SUM ( 'Table'[Production] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Location] ),
[Months Producing] <= MAX ( 'Table'[Months Producing] )
)
)
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Hamdan1234 , You can use closingbalancemonth or lastnonblank(values('Date'[Date]), [meausre])
refer
https://www.youtube.com/watch?v=yPQ9UV37LOU
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 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |