March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All ,
i have successfully done the condition measure as per below . and i would like to turn this into column , the intention to do so is , that would be easier to do some filter on each rank as apply . in the meantime , i couldn't perform any filter or slicer because it's measure . may i know how can we acheive this ?
Solved! Go to Solution.
Hi , @Chanleakna123
Here are the steps you can refer to :
(1)My test data is teh same as yours.
(2)We can click "New Column "to create a calculated column :
Deciling Bank = var _current_customer = 'Table'[Customer Code]
var _cunrrent_year = YEAR('Table'[Date])
var _last_year =SUMX( FILTER('Table','Table'[Customer Code]=_current_customer && YEAR('Table'[Date]) =_cunrrent_year -1 ) ,[Vol])
var _this_year =SUMX( FILTER('Table','Table'[Customer Code]=_current_customer && YEAR('Table'[Date]) =_cunrrent_year ) ,[Vol])
var _Growth = DIVIDE( _this_year - _last_year , _last_year)
return
IF(_Growth <0 , SWITCH(TRUE() , _Growth>=-0.1 && _Growth<=0 ,"0%-10%" , _Growth>=-0.3 && _Growth<-0.1 ,"10%-30%",_Growth>=-0.5 && _Growth<-0.3,"30%-50%",_Growth>=-0.7 && _Growth<-0.5 ,"50%-70%",_Growth>=-0.9 && _Growth<-0.7,"70%-90%" , _Growth>=-1 && _Growth<-0.9 ,"90%-100%+" ) , BLANK())
(2)Then we can meet your need , the result is as follows:
(3)The second need I have realized in the "Report" view , you can see it in the .pbix file .
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @Chanleakna123
Here are the steps you can refer to :
(1)This is my test data :
(2)We need to create a table like this:
(3)Then we can create a measure :
Measure = var _slicer_table = VALUES('Slicer Table'[Compare])
var _min_slicer = MINX(_slicer_table,[Compare])
var _value =SELECTEDVALUE('Table'[%Growth 330-Sell both])
return
IF( _value > _min_slicer ,1,0)
(4)Then we can put the measure on the "filter on this visual" then we can meet your need:
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @v-yueyunzh-msft , the Growth 330-sell both is a measure as i am having right now.
and when i use the formula seems not working on the measure of Growth 330-sell both.
can you please help on this ?
this is my mesure of growth rate :
my purpose is to put into the visual , to see which customer is piloting into any rank .
Measure = var _slicer_table = VALUES('Slicer Table'[Compare])
var _min_slicer = MINX(_slicer_table,[Compare])
var _value =SELECTEDVALUE('Table'[%Growth 330-Sell both])
return
IF( _value > _min_slicer ,1,0)
Hi , @Chanleakna123
If it is a measure , you just need to modify the "_value" parameter in the dax :
Measure = var _slicer_table = VALUES('Slicer Table'[Compare])
var _min_slicer = MINX(_slicer_table,[Compare])
var _value =[Your Measure]
return
IF( _value > _min_slicer ,1,0)
Then we can realize it.
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
hi @v-yueyunzh-msft ,
this is what we want . Rank column , is what we want , so when we do the visualization , we will put this into legend part to understand how many customer falls into each rank.
Hi , @Chanleakna123
Sorry , i didn't meet your need . According to yuour description, you want to create a calculated column to get the "Rank" column . Right?
And the judgement is the measure of [%Growth-Selling Both].
For your needs, when we create a new column, we need to write dax according to your needs, find the corresponding [%Growth-Selling Both] value for each row, and then use the switch() function to judge and output the corresponding value.
For each row to calculate the corresponding [%Growth-Selling Both] is to combine your business logic to write DAX, if you can, you can provide the following sample data template, and the final sample data you want to give us, so that we can better help you.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @Chanleakna123
Here are the steps you can refer to :
(1)My test data is teh same as yours.
(2)We can click "New Column "to create a calculated column :
Deciling Bank = var _current_customer = 'Table'[Customer Code]
var _cunrrent_year = YEAR('Table'[Date])
var _last_year =SUMX( FILTER('Table','Table'[Customer Code]=_current_customer && YEAR('Table'[Date]) =_cunrrent_year -1 ) ,[Vol])
var _this_year =SUMX( FILTER('Table','Table'[Customer Code]=_current_customer && YEAR('Table'[Date]) =_cunrrent_year ) ,[Vol])
var _Growth = DIVIDE( _this_year - _last_year , _last_year)
return
IF(_Growth <0 , SWITCH(TRUE() , _Growth>=-0.1 && _Growth<=0 ,"0%-10%" , _Growth>=-0.3 && _Growth<-0.1 ,"10%-30%",_Growth>=-0.5 && _Growth<-0.3,"30%-50%",_Growth>=-0.7 && _Growth<-0.5 ,"50%-70%",_Growth>=-0.9 && _Growth<-0.7,"70%-90%" , _Growth>=-1 && _Growth<-0.9 ,"90%-100%+" ) , BLANK())
(2)Then we can meet your need , the result is as follows:
(3)The second need I have realized in the "Report" view , you can see it in the .pbix file .
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
hi dear,
i have applied as said , and when i click on declining rank from 30%->50% , it gives me the customers who also flat 0% also in the rank as well as the customers who are declining -100% also within the rank . however i can see the right customers who are in the list of declining rate of 30%->50% . can we fix on 0% and -100% ?
i tryna play around , but it's not working as expected.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
91 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
73 | |
68 |