Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I have seen versions of this question asked and answered here many times but I can't get any of those answers to work for my situation.
I have a dataset called VW3 which contains sales data over dimensions like location, staff member, project and date.
I have created a new dataset which contains only the distinct dates from VW3 called SAD. I have also created a measure on SAD called Selected
SAD and VW3 have a 1 to many relationship between VW3.ShiftDate AND SAD.Date.
I have a date slicer (which uses the Between style) using the SAD dataset and I want to create a total of sales for that period, ignoring all other dimensions and have tried the following
I know I am doing something wrong because GMRunningTotal changes if I alter the value of the dimension slicer but I only want date to affect it.
Please, if you are able, tell me where I am going wrong because I have become very confused and do not know how to proceed.
Thanks in advance
Solved! Go to Solution.
Try:
GMRunningTotal =
CALCULATE(
SUM(VW3[PL]),
DATESBETWEEN(
SAD[Date],
MIN(SAD[Date]),
MAX(SAD[Date])
)
)
If this answer helped, please click 👍 or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande
I know I am doing something wrong because GMRunningTotal changes if I alter the value of the dimension slicer but I only want date to affect it.
Don't join the tables if you don't want the filter context to impact your results. Use overrides like REMOVEFILTERS, and consider using window functions instead.
Try:
GMRunningTotal =
CALCULATE(
SUM(VW3[PL]),
DATESBETWEEN(
SAD[Date],
MIN(SAD[Date]),
MAX(SAD[Date])
)
)
If this answer helped, please click 👍 or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande
Thank you very much, that is exactly what I needed
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 22 | |
| 10 | |
| 10 | |
| 6 | |
| 5 |