Forum Discussion
Anonymous
4 years agoNot applicable
Custom Division
Hi,
Before explaining the problem, let me paste sample data set.
| Date | Name | Value |
| 01-Jul-22 | G | 10 |
| 02-Jul-22 | G | 20 |
| 03-Jul-22 | G | 30 |
| 04-Jul-22 | G | 40 |
| 05-Jul-22 | G | 50 |
| 01-Jul-22 | O | 60 |
| 02-Jul-22 | O | 70 |
| 03-Jul-22 | O | 80 |
| 04-Jul-22 | O | 90 |
| 05-Jul-22 | O | 100 |
| 01-Jul-22 | C | 110 |
| 02-Jul-22 | C | 120 |
| 03-Jul-22 | C | 130 |
| 04-Jul-22 | C | 140 |
| 05-Jul-22 | C | 150 |
I want to create a measure which will divide only "G" and "C" values with a certain number let's say 10.
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;
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/
1 Reply
- ValtteriNCommunity Champion
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;
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/