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 - I am trying to figure out how to calculate PQ column for it to give the sum of all selected quarters in the slicer. Right now it's giving values only for 1 quarter as I have used SELECTEDVALUE. I have tried using functions such as countx, ALLSELECTED, SUM but nothing seems to work
Solved! Go to Solution.
Hi @J0676s ,
Please try this measure:
Orders PQ # = CALCULATE([PQ SUM],DATEADD('Calendar'[Date],-1,QUARTER))
Output:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi @J0676s ,
Please try this measure:
Orders PQ # = CALCULATE([PQ SUM],DATEADD('Calendar'[Date],-1,QUARTER))
Output:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Doesn't look like that'd work if you select consecutive quarters.
I think the selectedvalue would have to be values() to return an array of multiple values just to get the multiple selections in the DAX measure. From there you would need to define a range for the prior period, something like
prevperiodend = min(values()) - 1
prevperiodbegin = prevperiodend - (max(values()) - min(values())
Of course with only 4 qtrs / year and allowing multiple selections the odds you'll cross over a year are pretty good so doing it based on quarter might fail unless it's counting squentially across years.
Thank you for your response.
I am a beginner and still learning. To sum up, are you suggesting to first create meausres for Prevperiod begin and Prevperiodend and then using that create a PQ measure?
Measures or variables within the measure. DAX isn't my strong suit but just coding logic you have to define the range the user seelcted and then compute an equivalent prior period before you can hope to use them as filters.
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 |
---|---|
108 | |
106 | |
86 | |
77 | |
69 |
User | Count |
---|---|
120 | |
112 | |
94 | |
84 | |
75 |