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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BYENER
Helper V
Helper V

Show standard last value card visual and change by clicking

Hi All,

 

I want to show standard the last value on the Card visual. When I click on another date in a bar visual than card value have to be changed.

Can someone help?

 

BYENER_0-1624372693252.png

BYENER_1-1624372705501.png

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @BYENER ,

Here are the steps you can follow:

1. Create measure.

Sum =
var _1 = MAXX(ALL('Date'),'Date'[Date])
return
IF(ISFILTERED('Date'[Date]),SUM(Group_registratie[Bruto Duration]),SUMX(FILTER(ALL(Group_registratie),[Date]=_1),[Bruto Duration]))

2. Result:

When selecting, display the current value:

vyangliumsft_0-1624953626744.png

When not selected, the final value is displayed:

vyangliumsft_1-1624953626751.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

11 REPLIES 11
BYENER
Helper V
Helper V

thanks @v-yangliu-msft  this is working!

v-yangliu-msft
Community Support
Community Support

Hi  @BYENER ,

Here are the steps you can follow:

1. Create measure.

Sum =
var _1 = MAXX(ALL('Date'),'Date'[Date])
return
IF(ISFILTERED('Date'[Date]),SUM(Group_registratie[Bruto Duration]),SUMX(FILTER(ALL(Group_registratie),[Date]=_1),[Bruto Duration]))

2. Result:

When selecting, display the current value:

vyangliumsft_0-1624953626744.png

When not selected, the final value is displayed:

vyangliumsft_1-1624953626751.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.

 

v-yangliu-msft
Community Support
Community Support

 

Hi  @BYENER ,

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

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.

 

v-yangliu-msft
Community Support
Community Support

Hi  @BYENER ,

I create some data:

vyangliumsft_0-1624517222560.png

Here are the steps you can follow:

1. Create measure.

Measure =
var _1=MAXX(ALL('Table'),'Table'[date])
return
IF(ISFILTERED('Table'[date])
,SUM('Table'[amount]),
SUMX(FILTER(ALL('Table'),'Table'[date]=_1),'Table'[amount])
)

2. Place the measure in the card

3. Result:

When not selected, the final value is displayed

vyangliumsft_1-1624517222564.png

 

Select a date and display the value of the date:

vyangliumsft_2-1624517222567.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.

@v-yangliu-msft  , I used the measure, but still the same. Did I something wrong in the measure?

 

var _1 = MAXX(ALL('Date'),'Date'[Date])
return
IF(ISFILTERED('Date'[Date])
,SUM(Group_registratie[Bruto Duration]),
SUMX(FILTER(ALL('Date'),'Date'[Date]=_1),SUM(Group_registratie[Bruto Duration])
))
selimovd
Super User
Super User

Hey @BYENER ,

 

you can disable that the selection of the bar chart will interact with the cards.

Check the documentation on how to do that:

Change how visuals interact in a report - Power BI | Microsoft Docs

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

@selimovd I don't want to disable it. It's showing the last date value, but when I click on anoter data than it shows BLANK. It should display the value instead of blank.

Hey @BYENER ,

 

it's displaying the value.

But for your example the value on May 26th is blank, for that reason it shows blank. You can override this behavior with DAX, but then you have to define specifically what it should display.

 

You could say when it's blank it should show the total. But to be honest that will be very confusing for users as they never know if that's now the value of the current selection or if it's the total.

It's your choice at the end.

 

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

@selimovd  Okay let's try to explain in another way. When I click on 26th of June than the values from that day are showing in the card visuals. When I don't click on any date than it shows the total value except the card on the top. That is displaying the last date. 

I want to show also on the other cards the last value when we don't click on the bars and when we click then the value of the selected date.



Below is showing the total values.
BYENER_1-1624433659747.png

BYENER_2-1624433942127.png

 

@BYENER I know what you means. You solve that by a measure like that:

UrenVisual =
IF(
    [Uren] = BLANK(),
    CALCULATE(
        [Uren],
        ALL( myTable )
    ),
    [Uren]
)

 

But again, the user will not know if he sees the total or the selected date. So be prepared to answer some questions about wrong results or confusion. Or worse that people use the total for a date because they click the date and it shows the total instead of the actual result.  

 

Best regards

Denis

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors