Forum Discussion
Change Card (X/Y) Position Based on Values?
- 4 years ago
Hi Terp ,
1. First create four cards, divided into two groups: Group A and Group B.
2. Then turn off the following options for each of the cards.
3. Create the following measures.
Diff = SUM('Table'[Exports]) - SUM('Table'[Imports])Diff<0 = IF( [Diff] < 0, "#FFFFFF00", "#000000" )Diff>0 = IF( [Diff] > 0, "#FFFFFF00", "#000000" )4. Apply the measure "Diff>0" to the color of the data label and category label of the cards in Group A.
5. Apply the measure "Diff<0" to the color of the data label and category label of the cards in Group B.
6. The final result is as follows:
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
...just to add. One 'workaround' I could do, given how new I am to PowerBI and my lack of DAX mastery, would be to have two bookmarks—one 'right-side high' and one 'left-side high' or whatever.
The issue would be the filtering...user changes the date range, the 'balance' value flips the scale image, then must show the respective bookmark based on the value...have to put more thought into this one for sure, but if anyone has a more elegant solution, love to hear ideas. 🙂
Hi Terp ,
1. First create four cards, divided into two groups: Group A and Group B.
2. Then turn off the following options for each of the cards.
3. Create the following measures.
Diff = SUM('Table'[Exports]) - SUM('Table'[Imports])Diff<0 = IF( [Diff] < 0, "#FFFFFF00", "#000000" )Diff>0 = IF( [Diff] > 0, "#FFFFFF00", "#000000" )
4. Apply the measure "Diff>0" to the color of the data label and category label of the cards in Group A.
5. Apply the measure "Diff<0" to the color of the data label and category label of the cards in Group B.
6. The final result is as follows:
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.