The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi EVERYONE
I have An Indicator that is Calculated Monthly, I need a Measure that calculates it quarterly based on the Max of each Quarter. EXample
my indicator calculate the values monthly , like this table, what i want , to return Max value in each Quarter for each company , The variable is the numerator divided by the denominator, i have date table with Month column, and quarter column and year.
COMP Name | OCT | NOV | DEC |
SDDF | 1200$ | 13000 | 8000$ |
SSD | 20000$ | 18000% | 30000$ |
FDE | 90000$ | 13000$ | 25000$ |
Solved! Go to Solution.
Hello:
This measure will give you the monthly max for each quarter. You can plug your measure in where I have [Total Sales],then set your visual to quarterly.
Hello:
This measure will give you the monthly max for each quarter. You can plug your measure in where I have [Total Sales],then set your visual to quarterly.
thanks!
can you explain what this part of dax mean?
Filter('Date','Date'[Month] <=Max('Date'[Month])))
Hi:
This part means (Filter('Date','Date'[Month] or Filter(ALL('Date','Date'[Month]) or Filter(ALLSELECTED('Date','Date'[Month] ) that the engine will go through all the months in your visual. Using the ALLSELECTED version could be the best choice.
The second part (<=Max('Date'[Month]))) means look at all the months up to and including the last month(MAX Month) in your visual.
Since youer visual is based on Quarters, it will look at the months reporting into each Quarter and provide the highest month in the Quarter.
Below is another pattern doing the same type of thing, using SUMMARIZE to review all the months involved.
HighestMonthValue =
MAXX (
SUMMARIZE (
TableName,
TableName[Month],
"Total Sales", SUM ( SalesTableName[Sales] )
),
[Total Sales]
)
User | Count |
---|---|
15 | |
11 | |
8 | |
8 | |
7 |
User | Count |
---|---|
21 | |
20 | |
11 | |
10 | |
7 |