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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

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 @Anonymous, 

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 @Anonymous, 

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

Top Solution Authors
Top Kudoed Authors