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

Custom Division

Hi,

Before explaining the problem, let me paste sample data set.

 

DateNameValue
01-Jul-22G10
02-Jul-22G20
03-Jul-22G30
04-Jul-22G40
05-Jul-22G50
01-Jul-22O60
02-Jul-22O70
03-Jul-22O80
04-Jul-22O90
05-Jul-22O100
01-Jul-22C110
02-Jul-22C120
03-Jul-22C130
04-Jul-22C140
05-Jul-22C150

 

I want to create a measure which will divide only "G" and "C" values with a certain number let's say 10.

 

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

Try something like this:

DAX:

Divide G and C =
IF(MAX('Table'[Name]) in {"G","C"},
DIVIDE(MAX('Table'[Value]),10)
,MAX('Table'[Value]))


End result;
ValtteriN_0-1659680888795.png

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/







Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ValtteriN
Super User
Super User

Hi,

Try something like this:

DAX:

Divide G and C =
IF(MAX('Table'[Name]) in {"G","C"},
DIVIDE(MAX('Table'[Value]),10)
,MAX('Table'[Value]))


End result;
ValtteriN_0-1659680888795.png

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/







Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.