Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have a large table that contains sales $s by store number on a daily basis (1 row per store per day). I'm trying to create a measure that will compare the total sales for each store against the average of the two prior months - however, I only want the measure/sum to include store numbers that are present in each of the 3 months (current month & two prior months being used for the baseline).
So - Jan total $s sold total will be compared to average of Nov & Dec $s total - but only store numbers that are present in the sales data in Nov, Dec & Jan should be included in the totals...
Thank you in advance!
Hi @Anonymous ,
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi Miguel,
The part I'm struggling with is how to identify the common stores across the 3 month range - lets say I have something like this (I'm able to do a distinct for each month to get the strings/values):
Jan = {"A", "B", "C", "D"}
Feb = {"B", "C", "D"}
Mar = {"C", "D", "F", "G"}
How can I write DAX to get the answer:
Common = {"C", "D"}
Result should be an array as there will likely be hundreds of values/store codes that I will then use as a filter to get the sales for those stores.
Thanks!
Hi @Anonymous ,
Depending on the way you have the model. Do you have any calendar table?
Asking this because you need to make an intersect between the 3 months values, but to do the filter of the 3 months, But depending on how you have the model there may need to be some adjustments made.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThis is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
75 | |
60 | |
37 | |
33 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |