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,
Could anyone please help me creating a number of days in a quarter.
I have a scenario to calculate the sales divided by a number of days in the selected quarter.
For Example,
I have the table visual consist of date column, sales amount per each date. Now, I need to create a column to show (Sales Amount/Days in the fiscal quarter).
If the user selects 19Q1 and 19Q3 then the number of days should be 181
For 19Q1 related dates sales amount should be divided by 91(number of days in this quarter)
For 19Q3 related dates sales amount should be divided by 89((number of days in this quarter).
Thank you!
Solved! Go to Solution.
Hi @tulasi_pbi1988 ,
Does that make sense? If so, kindly mark my answer as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.
Best regards
Amy
Hi @tulasi_pbi1988 ,
Does that make sense? If so, kindly mark my answer as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.
Best regards
Amy
Hi @tulasi_pbi1988 ,
Assuming the column which contains 19Q1 and 19Q3 is called [Year & Quarter], then you can create measure like DAX below.
Average sales for Quarter= DIVIDE(CALCULATE(SUM(Table1[sale]),FILTER(ALLSELECTED(Table1), Table1[Year & Quarter] =MAX(Table1[Year & Quarter]))) ,CALCULATE(COUNT(Table1[Date]),FILTER(ALLSELECTED(Table1), Table1[Year & Quarter] =MAX(Table1[Year & Quarter]))))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You may want to check this thread:
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |