Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello everyone,
I have a line chart, and when I click on a specific date, my card will show the value for that day, like this:
Clicking on Oct-02, Card shows 5 (that's okay!)
However, when all the dates are select in the chart, the card shows the total count (20):
But what I want to see in the card is only the last value (6) instead of 20 when I am selecting all the dates.
Does anybody know how to get it solved in Power BI?
Many thanks
Julio
Solved! Go to Solution.
Hi @Julio-YYC ,
sorry, i understood wrong.
Here are the steps you can follow:
1. Create measure.
Measure =
var _select=SELECTCOLUMNS('Table',"1",[Day])
var _maxdate=MAXX(ALL('Table'),[Day])
return
IF(
_maxdate in _select,
SUMX(FILTER(ALL('Table'),'Table'[Day]=_maxdate),[Value]),
SUMX(FILTER(ALL('Table'),'Table'[Day] in _select),[Value]))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Julio-YYC ,
sorry, i understood wrong.
Here are the steps you can follow:
1. Create measure.
Measure =
var _select=SELECTCOLUMNS('Table',"1",[Day])
var _maxdate=MAXX(ALL('Table'),[Day])
return
IF(
_maxdate in _select,
SUMX(FILTER(ALL('Table'),'Table'[Day]=_maxdate),[Value]),
SUMX(FILTER(ALL('Table'),'Table'[Day] in _select),[Value]))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
I Appreciate that Liu Yang, it's working perfectly.. many thanks!
Hi @Julio-YYC ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _elect=SELECTCOLUMNS('Table',"1",[Day])
return
SUMX(FILTER(ALL('Table'),'Table'[Day] in _elect),[Value])
2. Result:
Select Single:
Select all:
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Liu,
Actually, when selecting all the chart, I need to show "6" on the card (the latest date available on Oct-05) instead of 20.
Hi @Julio-YYC ,
try this
Hi Mangaus,
The solution from Liu worked better for me...anyways, thanks for helping!
User | Count |
---|---|
121 | |
76 | |
63 | |
51 | |
50 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |