cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors