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 have my chart show the data for YTM based on the Year and Month slicer selected. So if i have 2019 and July selected, then chart should show Jan2019 to July2019 data.
I have uploaded a sample of my file. Can someone please help me with the dax? Pbix file
Solved! Go to Solution.
Hi @galbatrox9 ,
1. You need add a comma before "12".
2. It should be "Start_Month" instead of "Start-Month".
3. You need to replace "Aggregation Column" with your own column name.
Hi,
You can use the below DAX. Please change the Month Format to what you are using like "Jan", "Feb"... etc.
Measure:= VAR Year= SELECTEDVALUE(Table[Year]) VAR Start_Month=1 VAR Till_Month= SWITCH(SELECTEDVALUE(Table[Month]), "January",1,"February", 2, "March", 3, "April" , 4, "May", 5,"June",6, "July", 7, "August" , 8, "September", 9, "October", 10, "November", 11,"December" 12, "Unknown month number" ) RETURN MAXX(FILTER(Table, Table[Year]= Year && Table[Month] >= Start-Month && Table[Month]<= Till_Month), Table[Aggregation_Column])
Best Regards,
Vignesh M
If what I suggested worked for you feel free to Drop a "Kudos" and Consider to "Accept as Solution" if I solved your Issue 🙂
@Anonymous the Year reference is to the date table or my data table Table1?
Hi,
Same Table as the Filter. You can have it to Date Table
Best Regards,
Vignesh M
If what I suggested worked for you feel free to Drop a "Kudos" and Consider to "Accept as Solution" if I solved your Issue.
@Anonymous its giving me the below errors
Hi @galbatrox9 ,
1. You need add a comma before "12".
2. It should be "Start_Month" instead of "Start-Month".
3. You need to replace "Aggregation Column" with your own column name.
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 |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
107 | |
105 | |
87 | |
61 |