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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sainig546
Frequent Visitor

Dynamic column values

hi i am currently using this condition to get a measure 

 

Fact_metrics[CREATED DATE KEY] >=start_date && Fact_metrics[CREATED DATE KEY] <= EOMONTH(selected_date,0) ))
 
and this is how we are getting the start date and selected date
 
VAR selected_date = CALCULATE(format(max('Date'[Date Key]),"yyyy-mm-dd"),
ALLSELECTED('Date'))
VAR start_date = EOMONTH(selected_date,-2) + 1
 
Since this start date and selected date changes based on slicer
is there a way where i can make a column where we can use the above condition and the data also changes based on slicer
2 REPLIES 2
Anonymous
Not applicable

Hi @sainig546 ,

 

No. Since columns are static, they could not be dynamically changed based on slicer.

You could create measures instead.

 

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

amitchandak
Super User
Super User

@sainig546 , This should be like

 

VAR selected_date = max(allselected('Date'), Date'[Date Key])
VAR start_date = EOMONTH(selected_date,-2) + 1

 

check if you can use time intelligence

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.