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 All
I want a measure where i am calculating (Net Sales) and if I filter "june-2021" then the values will be only for June month. But I want to calculate Net sales from first month of the table till selected month (june) . For example table has a value from jan to june and if i select march then the Net sales should be from Jan to March.
Thanks in advance
Solved! Go to Solution.
Hi @jay_patel ;
You could create a new table as a slicer, and then create a measure to calculate Net sales by the following formula:
1.create a new slicer table and create a column:
slicer = SUMMARIZE('Table',[Date])
year-month = FORMAT([Date],"YYYY MMM")
2.create a sum measure:
sum =
CALCULATE (
SUM ( [Net sales] ),
FILTER (
ALL ( 'Table' ),
YEAR ( [Date] ) = YEAR ( MAX ( 'slicer'[Date] ) )
&& MONTH ( [Date] ) <= MONTH ( MAX ( 'slicer'[Date] ) )
)
)
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.
You can use Running Total Measure for cummulative sum and a slicer to select a Month.
Measure for Running Total -
Hi @jay_patel ;
You could create a new table as a slicer, and then create a measure to calculate Net sales by the following formula:
1.create a new slicer table and create a column:
slicer = SUMMARIZE('Table',[Date])
year-month = FORMAT([Date],"YYYY MMM")
2.create a sum measure:
sum =
CALCULATE (
SUM ( [Net sales] ),
FILTER (
ALL ( 'Table' ),
YEAR ( [Date] ) = YEAR ( MAX ( 'slicer'[Date] ) )
&& MONTH ( [Date] ) <= MONTH ( MAX ( 'slicer'[Date] ) )
)
)
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.
@jay_patel , use time intelligence with date table
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
In case you need a trend refer
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
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 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
88 | |
63 |