Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi,
I have the following table to show what I am trying to do, I'm looking to consolidate 3 different measures depending on whether it's a previous month, current month or future month. The switch Dax I've written (Sales Count Forecast TEST) seems to do what I need it to do, but as you can see the total is completely wrong for that column.
I've then seen solutions that suggest creating a summarization to correct this error and as you can see, the total for that column is correct but now Sep 2021 figure is wrong and then future months are showing as 0.
I have pasted my dax measures below, would anyone be able to kindly advise how to get that summarization looking the same as the "TEST" column albeit with the correct total.
Thanks in advance.
P.S apologies for the messy dax writing.
Sales Count = CALCULATE(
DISTINCTCOUNT('Base.Quotes&Sales'[AgreementID]),
'Base.Quotes&Sales'[ActionTypeID]=2)
Sales Count Current Month Forecast 2 = INT(CALCULATE(DIVIDE([Sales Count Same Period Last Year]+[Sales Count Same Period 2 Yrs Ago]+[Sales Count Forecast Current Month],3,0)*(1+[Sales Count Year On Year Growth FLAT])))
Sales Count Future Months Forecast = INT(CALCULATE(DIVIDE(([Sales Count Average 2]*[Days In Month])+[Sales Count Same Period Last Year]+[Sales Count Same Period 2 Yrs Ago],3,0)*(1+[Sales Count Year On Year Growth FLAT])))
Sales Count Forecast TEST =
SWITCH(TRUE(),
SUM(RefCalendar[Previous Month])>0,[Sales Count],
SUM(RefCalendar[Current Month])>0,[Sales Count Current Month Forecast 2],
SUM(RefCalendar[Current Month])=0 && SUM(RefCalendar[Previous Month])=0,[Sales Count Future Months Forecast])
Summarize Column = Var summarizedTable = ADDCOLUMNS(SUMMARIZE(RefCalendar,RefCalendar[MonthYearName]),"Forecast",[Sales Count Forecast TEST])
RETURN
SUMX(summarizedTable,[Forecast])
I've solved my own problem here, or at least @Greg_Deckler did.
I created a new measure,
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
8 | |
7 |