Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |