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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Priya1969
Resolver I
Resolver I

Default Date and Full Date visual based on previous month date

My visual has values from January 2020 to December 2023. My requirement is when I open the report want to see the previous month and greater than previous month results. Also, I need the option to see "Full" values from Jan 2020 to December 2023.

I created this Dax query for filter the values, (// Append1 is table name)

 

 Date view = IF(Append1[DATE] >= Append1[Previous_Month].[Date], "Default"IF(Append1[DATE] <= Append1[Previous_Month2].[Date], "Full"))
 
// Previous Month Dax is 
Previous_Month = EOMONTH(NOW(),-2)+1
 
1. My 1st option is fulfilled. It shows the results from Previous month to end of December 2023.
yanjaga_0-1671821241111.png

 

2. When I select the Full option it shows up tp 10/1/222 from January 2020. Beacuse I gave <= previous month.

yanjaga_1-1671821372714.png

But, when I select "Full", I want to show upto December 2023. I don't know how to fulfill. Tried multiple ways, missing somewhere. What extra query I need to add here? Can someone help me solve this?

Thanks!

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Priya1969 

 

You can try the following methods.

Measure = IF(SELECTEDVALUE('Table'[Date])<=[Previous_Month],1,0)

vzhangti_0-1672027245548.png

This is the default date.

 

The full date is displayed when this measure is cleared.

vzhangti_1-1672027304878.png

Hope this method helps you.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @Priya1969 

 

You can try the following methods.

Measure = IF(SELECTEDVALUE('Table'[Date])<=[Previous_Month],1,0)

vzhangti_0-1672027245548.png

This is the default date.

 

The full date is displayed when this measure is cleared.

vzhangti_1-1672027304878.png

Hope this method helps you.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, Thanks for the reply. It's almost correct. Instead of giving measures in 'fiters on this visual' option, I did something like this. 

Date View = IF(Append1[DATE] >= Append1[Previous_Month].[Date] ,"Default","Other_Dates")
 
Then, in the format, slicer selection, on the 'Select all" option. Then it will show like this.
 
Priya1969_0-1672252327101.png

If i select, 'Select all' option, it shows all the dates. 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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