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
Anonymous
Not applicable

Is it possible to refer to a column in a measure without aggregating?

Basically in a visual you can add either a measure or a column.

I'm trying to add a measure that will dynamically change depeding on slicer filters.

 

What this would look like is:

 

IF(Selectedvalue)=1;TableXColunmX;If(selectedValue)=2;TableX;ColumnY))

 

So I would get the same as dragging a column in a visual, but is this possible? Right now If I try to add a column I'm forced to aggregate one way or another, I have managed to create something like this with Calculate(firstnonblank(TableXColumnX;True)) however this is very and I mean very slow, while just adding a column to the visual doesn't even take a second for it to load.

 

Any help is appreciated.

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Going to depend, but generally you do something like:

 

Measure to Show =

  SWITCH(SELECTEDVALUE('Table'[Column]),

    1,[Measure 1],

    2,[Measure 2],

    3,[Measure 3],

    [Measure 4]

  )

 

If that is not specific enough, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



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...

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , This is the good example of changing measure using slicer

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115

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
Greg_Deckler
Community Champion
Community Champion

Going to depend, but generally you do something like:

 

Measure to Show =

  SWITCH(SELECTEDVALUE('Table'[Column]),

    1,[Measure 1],

    2,[Measure 2],

    3,[Measure 3],

    [Measure 4]

  )

 

If that is not specific enough, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



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...
Anonymous
Not applicable

I had tried something similar and thought it wasn't working correctly.


Seems I was working with too much data for it to work properly, once I limited my data a bit it worked.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.