Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I need a DAX expression for below condition. Please help me on this ASAP. Thanks in advance.
1.if max value is 19 ,
then highestvalue in Y axis = 20
2.if max value is 123.4,
then highestvalue in Y axis = 130
3.if max value is 190 ,
then highestvalue in Y axis = 190
4.if max value is 135,
then highestvalue in Y axis = 140
Solved! Go to Solution.
Thanks for the response @v-yadongf-msft .
I have got my solution actully. Below is the query to get my desired output.
NewColumn = Roundup('ColumnName',-1)
this will give the below output
Base Column New Column
3 10
4.5 10
17 20
56 60
47 50
99 100
127 130
199 200
Hi @v-yadongf-msft Thanks for your response.
I have got solution for my issue. Below is the query for it
ResultColumn = ROUNDUP('ColumnName',-1)
this will give below result
ColumnName ResultColumn
4 10
17 20
89 90
144 150
237 240
Same way If want to get the nearest min 10th position value you need to use the query below
ResultColumn = ROUNDDOWN('ColumnName',-1)
This will give below output
ResultColumn ColumnName
5 0
13 10
67 60
99 90
157 150
hope this will help anyone in future thats why posting here.
Hi @krishnaHCL ,
This is my test table:
Create a new column:
NewValue = SWITCH(
TRUE(),
MAXX(FILTER('Table','Table'[Value] = EARLIER('Table'[Value])),'Table'[Value]) = 19, 20,
MAXX(FILTER('Table','Table'[Value] = EARLIER('Table'[Value])),'Table'[Value]) = 123.4, 130,
MAXX(FILTER('Table','Table'[Value] = EARLIER('Table'[Value])),'Table'[Value]) = 190, 190,
MAXX(FILTER('Table','Table'[Value] = EARLIER('Table'[Value])),'Table'[Value]) = 135, 140,
'Table'[Value]
)
I think you will get the result you want:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yadongf-msft Thanks for your response.
I have got solution for my issue. Below is the query for it
ResultColumn = ROUNDUP('ColumnName',-1)
this will give below result
ColumnName ResultColumn
4 10
17 20
89 90
144 150
237 240
Same way If want to get the nearest min 10th position value you need to use the query below
ResultColumn = ROUNDDOWN('ColumnName',-1)
This will give below output
ResultColumn ColumnName
5 0
13 10
67 60
99 90
157 150
hope this will help anyone in future thats why posting here.
Thanks for the response @v-yadongf-msft .
I have got my solution actully. Below is the query to get my desired output.
NewColumn = Roundup('ColumnName',-1)
this will give the below output
Base Column New Column
3 10
4.5 10
17 20
56 60
47 50
99 100
127 130
199 200
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
98 | |
96 | |
75 | |
71 | |
64 |
User | Count |
---|---|
140 | |
109 | |
103 | |
82 | |
73 |