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
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
v-eqin-msft
Community Support
Community Support

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.

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.