Forum Discussion
Sort a graphic
Hi guys,
In in this graphic, I would like to sort descending by the % of "Terminé" but I don't have this option in the suggestion of sorting. I think about creating a measure to put it in tooltips and I could sort by this one.
I count the number of Controle which are in "Terminé"and store it in X
I count the number total of Controle and store it in Y.
Finally, I do X/Y and put it in the tooltips but it don't work because the context filter the data either "En cours" either "Terminé", it depends where you put your mouse in.
Do you know how can I fix it ? there are maybe a dax fonction to ignore the context in order to calculate my measure
Thank you guys !!!
- Anonymous5 years ago
Hi Anonymous,
Please try this measure:
Measure = DIVIDE ( CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[Controle ] = MAX ( 'Table'[Controle ] ) && 'Table'[Status] = "Termine" ) ), CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[Controle ] = MAX ( 'Table'[Controle ] ) ) ) )Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.Best Regards,
Eyelyn Qin
3 Replies
- lbendlinSuper User
This is not the most elegant solution but it will work.
- AnonymousNot applicable
Can I ask why did you do +0 at the beginning of Return ?
- AnonymousNot applicable
Hi Anonymous,
Please try this measure:
Measure = DIVIDE ( CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[Controle ] = MAX ( 'Table'[Controle ] ) && 'Table'[Status] = "Termine" ) ), CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[Controle ] = MAX ( 'Table'[Controle ] ) ) ) )Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.Best Regards,
Eyelyn Qin