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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to calculate columns based on slicer selection

Hi Community,

I need a help… I newbie in Power BI and have de following case:

I have 2 slicers (Real, Comparative) filtering different calendars dimensions (dCalendar, dCalendarComp). The slicer Real, will be used to calculate a Measure (M1 = SUM(prod)) and the slicer Comparative, will be calculate another measure (M2 = SUM(prod)). Want to highlighted that M1 and M2 are calculated based on differents periods selecteds on slicer. Below it’s the model that I’m using.

 

image.png

 

 

In my table fact, I have a column named FLAG. In this column, just have the values 0 or 1. Based on these values, I need calculate a new column (named Index) following the condition: If the value of the FLAG = 1, then the value of the Index = 1, else I need divide M1 per M2 (M1/M2).

The problem is: When the slice is change the column doesn't recalculated to the new period. Can I create a dynamic column based on slicer? If can’t, have a workaround for this?

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

Columns are not dynamic, they are only calculated at the time of data load/refresh. You need to create a measure.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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