cancel
Showing results for
Did you mean:
Frequent Visitor

## display date in min/max card visualization

Hi all,

I've been searching for a measure to display the date also for my min/max card visualization.

Can power bi support this?

E.g. I have daily sales since 2022 till now, and i have 2 cards showing the max/min sales in a given day. The card shows the max valu we reaced till today in sales, but i als need to add the date.

Is there a way to do so?

2 ACCEPTED SOLUTIONS
Super User

Hi,

Here is one way to do this:

1. Data:

2. Dax:

Max Sales =
CALCULATE(max('MinMax KPI Sales'[Sales]),all('MinMax KPI Sales'))

Max Sales Date =
var _msales =
CALCULATE(max('MinMax KPI Sales'[Sales]),all('MinMax KPI Sales')) return

CALCULATE(max('MinMax KPI Sales'[Date]),ALL('MinMax KPI Sales'),'MinMax KPI Sales'[Sales]=_msales)

3. Place these values to e.g. Multirow card:

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

Proud to be a Super User!

Community Support

According to your description, I create a sample. You can add date to the table everyday as you needed.

Now, create two measures.

``Max = CALCULATE ( MAX ( 'Table'[Sales] ), ALLSELECTED ( 'Table' ) )``
``Min = CALCULATE ( MIN ( 'Table'[Sales] ), ALLSELECTED ( 'Table' ) )``

Put the two measures in card visuals and according to the date slicer, they will change dynamically.

I attach my sample below for reference.

Best Regards,
Community Support Team _ kalyj

If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.

4 REPLIES 4
Community Support

Has your problem been solved? If so, would you mind accept the helpful replies as solutions?
If you have a given date period slicer, you can modify  @ValtteriN 's solution with allselected function intead of ALL.

``````Max Sales =
CALCULATE ( MAX ( 'Table'[Sales] ), ALLSELECTED ( 'Table' ) )
``````

If you need further help, please feel free to let me know.

Best Regards,
Community Support Team _ kalyj

If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.

Frequent Visitor

Hi kalyj,

Can you please explain this more

Community Support

According to your description, I create a sample. You can add date to the table everyday as you needed.

Now, create two measures.

``Max = CALCULATE ( MAX ( 'Table'[Sales] ), ALLSELECTED ( 'Table' ) )``
``Min = CALCULATE ( MIN ( 'Table'[Sales] ), ALLSELECTED ( 'Table' ) )``

Put the two measures in card visuals and according to the date slicer, they will change dynamically.

I attach my sample below for reference.

Best Regards,
Community Support Team _ kalyj

If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.

Super User

Hi,

Here is one way to do this:

1. Data:

2. Dax:

Max Sales =
CALCULATE(max('MinMax KPI Sales'[Sales]),all('MinMax KPI Sales'))

Max Sales Date =
var _msales =
CALCULATE(max('MinMax KPI Sales'[Sales]),all('MinMax KPI Sales')) return

CALCULATE(max('MinMax KPI Sales'[Date]),ALL('MinMax KPI Sales'),'MinMax KPI Sales'[Sales]=_msales)

3. Place these values to e.g. Multirow card:

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

Proud to be a Super User!

Announcements

#### Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

#### European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

#### Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors