The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi - I have a month slicer and a line graph. When I select Feb, the line graph changes from line to a dot and displays Feb YTD. I want the line to display Jan YTD and Feb YTD with a line instead of the dot for the selected month. If no month is selected, I want the line to show all YTD month values upto available month.
Here are my tables:
Calendar Table
Actuals Table
Date joins to calendar table
Actuals YTD Measure
Solved! Go to Solution.
Hi @miii ,
1. Create a date table.
date = CALENDARAUTO()
2. Create a measure as below.
Measure = VAR _date = MAX ( 'date'[Date] ) RETURN CALCULATE ( SUM ( Table1[values] ), FILTER ( Table1, 'Table1'[date] <= _date ) )
Please find the pbix as attached.
Regards,
Frank
Hi,
See if my article here helps - Flex a Pivot Table to show data for x months ended a certain user defined month.
Hi @miii ,
1. Create a date table.
date = CALENDARAUTO()
2. Create a measure as below.
Measure = VAR _date = MAX ( 'date'[Date] ) RETURN CALCULATE ( SUM ( Table1[values] ), FILTER ( Table1, 'Table1'[date] <= _date ) )
Please find the pbix as attached.
Regards,
Frank
Thank you all, your tips really helped. I already had a Calender table just didn't know how to write the syntax will all the variables.
This is what I used and it worked.
Actual YTD:= var maxyear = MAX('Calendar'[Relative Year Index]) var _month = MAX(Scenario[SCENARIO_NUM]) return CALCULATE( [Actual], filter( 'Calendar', and( 'Calendar'[Relative Year Index] = maxyear , 'Calendar'[Month] <= _month ) ) ), DATESYTD('Calendar'[Date]) )
Monthly Actual Line:= var _month = MAX('Scenario'[SCENARIO_NUM]) RETURN if( VALUES('Calendar'[Month]) <= _month, CALCULATE( [Monthly Actual], filter('Actuals','Actuals'[ACCOUNTING_DT]), DATESYTD('Calendar'[Date]) ), Blank() )
I have tried going through the topic and formula but it didn't help my situation.
Any other clues would be greatly appreciated.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
80 | |
78 | |
46 | |
40 |
User | Count |
---|---|
149 | |
115 | |
67 | |
64 | |
58 |