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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Two date slicer for two kpi card of same column.

I have a calender table and a main table.

I want two kpi cards of one holding "outstanding amount" with a date slicer and where as in other kpi card having same "Outstanding amount" but a different date slicer , after that i want to calculate the difference between the two values of the kpi cards.

Is it possible?

1 ACCEPTED SOLUTION
Community Support

If you don't want to copy the calender table.

Maybe you can try this:

First of all, I create a set of sample data:

Then create a measure:

``````MEASURE =
VAR _maxdata =
MAX ( 'date'[date] )
VAR _mindata =
MIN ( 'date'[date] )
RETURN
CALCULATE ( SELECTEDVALUE ( sales[sales] ), 'date'[date] = _maxdata )
- CALCULATE ( SELECTEDVALUE ( sales[sales] ), 'date'[date] = _mindata )``````

Then create a slicer with the style of between:

Then you can choose two value(max and min) with the slicer.

The result is as follow:

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 REPLIES 3
Community Support

If you don't want to copy the calender table.

Maybe you can try this:

First of all, I create a set of sample data:

Then create a measure:

``````MEASURE =
VAR _maxdata =
MAX ( 'date'[date] )
VAR _mindata =
MIN ( 'date'[date] )
RETURN
CALCULATE ( SELECTEDVALUE ( sales[sales] ), 'date'[date] = _maxdata )
- CALCULATE ( SELECTEDVALUE ( sales[sales] ), 'date'[date] = _mindata )``````

Then create a slicer with the style of between:

Then you can choose two value(max and min) with the slicer.

The result is as follow:

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Frequent Visitor

Create a copy of the calendar table, duplicate the relationship between tables and use the copy for the second slicer.

Frequent Visitor

Thanks, I have tried creating two different tables and tried this and was able to get the solution.

## Helpful resources

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Join our Community Sticker Challenge

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

#### Power BI Monthly Update - July 2024

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

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors