Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

How to show an specific value in a line chart?

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!)

JulioYYC_0-1666550871218.png

However, when all the dates are select in the chart, the card shows the total count (20):

JulioYYC_1-1666550946000.png

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? 

 

 

JulioYYC_2-1666551179714.png

 

 

Many thanks

 

Julio

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous ,

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:

vyangliumsft_0-1666742752516.png

 

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

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi  @Anonymous ,

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:

vyangliumsft_0-1666742752516.png

 

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

Anonymous
Not applicable

I Appreciate that Liu Yang, it's working perfectly.. many thanks!

Anonymous
Not applicable

Hi  @Anonymous ,

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

vyangliumsft_0-1666686708882.png

Select all

vyangliumsft_1-1666686708887.png

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

Anonymous
Not applicable

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.

mangaus1111
Solution Sage
Solution Sage

Hi @Anonymous ,

 

try this

Measure = CALCULATE(
                   MIN('Facts26'[Value]),
                   'Facts26'[Day] = MAX('Facts26'[Day])
)
 
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Mangaus, 

The solution from Liu worked better for me...anyways, thanks for helping!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors