Forum Discussion
Ranking and Count using DAX
Hi Anonymous ,
I would want to create a column 'To include' where it will be 1 if it fits the rules, or 0 if it doesn't.
This column would be used to filer out the countries that are to be shown on a visual (a bar chart for example) which ranks the countries with 'to Include' = 1 based on the Air Weight.
Thanks!
@vaishali12 wrote:Hi @darlove ,
I would want to create a column 'To include' where it will be 1 if it fits the rules, or 0 if it doesn't.
Where do you want to create the column? I still don't understand... Would you please create some picture of what it really is you want and paste in here? You can draw on a piece of paper (but legibly!), take a pic with your phone and post here... That'll be the fastest way.
Best
Darek
- vaishali127 years agoFrequent Visitor
Hi Anonymous ,
I apologise for the delay in getting back to you. I've created a few snapshots of the original table with the snapshots and how the 'To Include' column in the original table changes (with the rules mentioned in the first post as the underlying logic) as the slicer selection changes.
1. Original table with no slicer selection
2. 'To Include' column changes with new slicer selection3. 'To Include' column changes with new slicer selection
Does this seem to make a little more sense? Thank you very much for your time!
Regards,
shali
- Anonymous7 years agoNot applicable
This is still not clear...
Where do you get Ranking from? Is this a field in one of your tables? Or is it a measure that adjusts accordingly to the currently visible countries in the column? I'm asking because if it's a column in a table, then it does not look like the rules you've given are going to work. If Ranking is a measure, then...
Best would be if you could take a screenshot of your model and paste in here. This would help a lot.
Thanks.
Best
Darek
- vaishali127 years agoFrequent Visitor
The ranking is a calculated mesaure that I've managed to figure out using DAX, so it's not built into the original table. Only the countries and Airweight are part of the original dataset.