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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jeongkim
Post Prodigy
Post Prodigy

Create measure as per referred column value

Hi,

 

I have a table and it has 10k rows data. 

The data is calculated by KPI Title.

Hope if the Unit is [%] then calculate for average, if not then calculate for sum. 

Pls help me to make measure. 

 

jeongkim_0-1751564586358.png

 

1 ACCEPTED SOLUTION
Daniel29195
Super User
Super User

Hello @jeongkim

hope you are doing great, 

 

 i think you can use a switch ( true () ,  statement with selectedvalue  

so example : 

switch (

true() ,

selectedvalue(tablename[unit]) = "[%]" , average ( col ) , 

sum ( col )

)

 

hope this helps. 

View solution in original post

1 REPLY 1
Daniel29195
Super User
Super User

Hello @jeongkim

hope you are doing great, 

 

 i think you can use a switch ( true () ,  statement with selectedvalue  

so example : 

switch (

true() ,

selectedvalue(tablename[unit]) = "[%]" , average ( col ) , 

sum ( col )

)

 

hope this helps. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors