Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Display all months but filter on date

Hi

 

I would like to know if it is possible to display all months for a graph but select a date in a slicer.

Like I want the full month value for January and February and month to date for March

MicrosoftTeams-image.png

Is it possible to create a measure to acheive this?

Thanks

 
2 REPLIES 2
Greg_Deckler
Super User
Super User

Yes, you would need an ALL statement in there and then filter down to what you need. See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks

But it seems like this measure does not behave like I want

 

Measure = 
VAR _MAXYEAR = MAX( 'Date'[Year] )
VAR _TMPTABLE = CALCULATETABLE( 'Date'; ALL( 'Date'[Year] ); ALL( 'Date'[Month] ); ALL( 'Date'[Date] ) )
RETURN
SUMX(FILTER(_TMPTABLE; 'Date'[Year] <= _MAXYEAR);[Turnover Tax Excl EUR])

 

I tried to have all possible dates I could, but as a result, in my graph the only date displayed is 2020-03-16

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors