Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
Hello experts!
I have a calculation for new members where it says till 31.05.2021(CutOverDate) read value from source 2 else from source 1 (Total new members = IF(MAX(Calendar[Date])>= [CutOverDate],[Members source 1], [Members source 2])). This measure shows correct values. But when I use it in YTD calculation (CALCULATE([Total new members],DATESYTD(Calendar[Date])), for the value of june 2021, it shows summed value for jan21 to june21 from source 1 and ignores the logic for Total new members. Please refer to the pic below. For June 2021 instead of showing 19955 it should show 13834(10869+2965). How to get YTD calculation right?
Regards
PP
Solved! Go to Solution.
I think first You should create a New intermediate measure to calculate the correct calculation for totals.
Total Members =
SUMX(VALUES(Dates[Month & Year]),[Total new members])
Now, this measure should be used in YTD measure to get correct YTD numbers.
Proud to be a Super User!
I think first You should create a New intermediate measure to calculate the correct calculation for totals.
Total Members =
SUMX(VALUES(Dates[Month & Year]),[Total new members])
Now, this measure should be used in YTD measure to get correct YTD numbers.
Proud to be a Super User!
@FarhanAhmed : Thank you for your tip. It worked. But instead of month, I used date since user needs to drill down till day level. (Total members test = SUMX(VALUES(Calendar[Date]),[Total new members])). When I use it in the report then it takes lot of time to process the data than before. Can I do anything to load the data faster?
See if this helps
Optimizing DAX expressions involving multiple measures - SQLBI
Proud to be a Super User!
@PBIDEV_10 make sure calendar is marked as date table and you are using year, month, and month name from calendar table
@amitchandak Yes. Calendar is marked as a date table and I am using year, month from the same table.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 39 | |
| 37 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 67 | |
| 34 | |
| 33 | |
| 30 |