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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
AdithyaVar
Frequent Visitor

Select 2 Dates in Filters on Main dashboard & see projects (in table) which have changes status/valu

Data Structure

ProjectNameStausStart DateAmountReporting Date
1abcOpen7/1/2021100011/1/2021
2defClose7/5/2021200011/1/2021
3ghiCancelled6/2/2021300011/1/2021
4jklInactive8/4/2021400011/1/2021
5mnoInactive6/1/2021500011/1/2021
6pqrOpen7/18/2021600011/1/2021
7stuHold7/7/2021700011/1/2021
1abcHold7/19/2021100011/2/2021
2defClose7/5/2021250011/2/2021
3ghiCancelled6/20/2021300011/2/2021
4jklActive8/4/2021330011/2/2021
5mnoInactive6/1/2021500011/2/2021
6pqr 7/7/2021620011/2/2021
7stuHold7/7/2021700011/2/2021
1abcOpen7/1/2021120011/3/2021
2defClose7/5/2021250011/3/2021
3ghiCancelled6/2/2021011/3/2021
4jklActive8/4/2021330011/3/2021
5mnoActive6/1/2021525011/3/2021
6pqrOpen7/18/2021 11/3/2021
7stuHold7/7/2021700011/3/2021
8vwxOpen8/12/2021900011/3/2021
1abcOpen7/1/2021120011/4/2021
2defClose7/5/2021250011/4/2021
3ghiCancelled6/2/2021400011/4/2021
4jklInactive8/4/2021330011/4/2021
5mnoInactive6/1/2021525011/4/2021
6pqrOpen7/18/2021620011/4/2021
7stuHold7/7/2021740011/4/2021
1abcOpen7/1/2021120011/5/2021
2defClose7/5/2021250011/5/2021
3ghiCancelled6/2/2021400011/5/2021
4jklInactive 330011/5/2021
5mnoInactive6/1/2021525011/5/2021
6pqrOpen 620011/5/2021
7stuHold7/10/2021740011/5/2021
8vwxOpen8/12/2021900011/5/2021

 

Output & use cases are mentioned below

AdithyaVar_0-1645425730590.png

 

AdithyaVar_1-1645425761223.png

 

 

 

 

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

Hi  @AdithyaVar ,

Here are the steps you can follow:

1. Create calculated table.

Date = DISTINCT('Table'[Reporting Date])

vyangliumsft_0-1645687309228.png

2. Create measure.

Start Date 1  &&  Start Date 2:

Start Date -1 =
var _min=MIN('Date'[Date])
var _max=MAX('Date'[Date])
return
CALCULATE(MAX('Table'[Start Date]),FILTER(ALL('Table'),'Table'[Project]=MAX('Table'[Project])&&'Table'[Reporting Date]=_min))
Start Date -2 =
var _min=MIN('Date'[Date])
var _max=MAX('Date'[Date])
return
CALCULATE(MAX('Table'[Start Date]),FILTER(ALL('Table'),'Table'[Project]=MAX('Table'[Project])&&'Table'[Reporting Date]=_max))
Flag =
IF(
[Start Date -1]=[Start Date -2],0,1)

Status1  &&  Status2:

Status1 =
var _min=MIN('Date'[Date])
var _max=MAX('Date'[Date])
return
CALCULATE(MAX('Table'[Staus]),FILTER(ALL('Table'),'Table'[Project]=MAX('Table'[Project])&&'Table'[Reporting Date]=_min))
Status2 =
var _min=MIN('Date'[Date])
var _max=MAX('Date'[Date])
return
CALCULATE(MAX('Table'[Staus]),FILTER(ALL('Table'),'Table'[Project]=MAX('Table'[Project])&&'Table'[Reporting Date]=_max))
Flag2 =
IF(
[Status1]=[Status2],0,1)

Value1  &&  Value2:

Value1 =
var _min=MIN('Date'[Date])
var _max=MAX('Date'[Date])
return
CALCULATE(MAX('Table'[Amount]),FILTER(ALL('Table'),'Table'[Project]=MAX('Table'[Project])&&'Table'[Reporting Date]=_min))
Value2 =
var _min=MIN('Date'[Date])
var _max=MAX('Date'[Date])
return
CALCULATE(MAX('Table'[Amount]),FILTER(ALL('Table'),'Table'[Project]=MAX('Table'[Project])&&'Table'[Reporting Date]=_max))
Flag3 =
IF(
    [Value1]=[Value2],0,1)

3. Put [Flag], [Flag2], [Flag3] in each Visual Filter, and set is=1, apply filter.

vyangliumsft_1-1645687309229.png

4. Result:

Use Date table [Date] as slicer

Start Date 1  &&  Start Date 2:

vyangliumsft_2-1645687309231.png

Status1  &&  Status2:

vyangliumsft_3-1645687309232.png

Value1  &&  Value2:

vyangliumsft_4-1645687309233.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

4 REPLIES 4
v-yangliu-msft
Community Support
Community Support

Hi  @AdithyaVar ,

Here are the steps you can follow:

1. Create calculated table.

Date = DISTINCT('Table'[Reporting Date])

vyangliumsft_0-1645687309228.png

2. Create measure.

Start Date 1  &&  Start Date 2:

Start Date -1 =
var _min=MIN('Date'[Date])
var _max=MAX('Date'[Date])
return
CALCULATE(MAX('Table'[Start Date]),FILTER(ALL('Table'),'Table'[Project]=MAX('Table'[Project])&&'Table'[Reporting Date]=_min))
Start Date -2 =
var _min=MIN('Date'[Date])
var _max=MAX('Date'[Date])
return
CALCULATE(MAX('Table'[Start Date]),FILTER(ALL('Table'),'Table'[Project]=MAX('Table'[Project])&&'Table'[Reporting Date]=_max))
Flag =
IF(
[Start Date -1]=[Start Date -2],0,1)

Status1  &&  Status2:

Status1 =
var _min=MIN('Date'[Date])
var _max=MAX('Date'[Date])
return
CALCULATE(MAX('Table'[Staus]),FILTER(ALL('Table'),'Table'[Project]=MAX('Table'[Project])&&'Table'[Reporting Date]=_min))
Status2 =
var _min=MIN('Date'[Date])
var _max=MAX('Date'[Date])
return
CALCULATE(MAX('Table'[Staus]),FILTER(ALL('Table'),'Table'[Project]=MAX('Table'[Project])&&'Table'[Reporting Date]=_max))
Flag2 =
IF(
[Status1]=[Status2],0,1)

Value1  &&  Value2:

Value1 =
var _min=MIN('Date'[Date])
var _max=MAX('Date'[Date])
return
CALCULATE(MAX('Table'[Amount]),FILTER(ALL('Table'),'Table'[Project]=MAX('Table'[Project])&&'Table'[Reporting Date]=_min))
Value2 =
var _min=MIN('Date'[Date])
var _max=MAX('Date'[Date])
return
CALCULATE(MAX('Table'[Amount]),FILTER(ALL('Table'),'Table'[Project]=MAX('Table'[Project])&&'Table'[Reporting Date]=_max))
Flag3 =
IF(
    [Value1]=[Value2],0,1)

3. Put [Flag], [Flag2], [Flag3] in each Visual Filter, and set is=1, apply filter.

vyangliumsft_1-1645687309229.png

4. Result:

Use Date table [Date] as slicer

Start Date 1  &&  Start Date 2:

vyangliumsft_2-1645687309231.png

Status1  &&  Status2:

vyangliumsft_3-1645687309232.png

Value1  &&  Value2:

vyangliumsft_4-1645687309233.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

AdithyaVar
Frequent Visitor

Hi Amit, i was able to do perform few steps to get partial requirement

AdithyaVar_0-1645438042583.png

Since the above is to represent value it is fine. But i want to compare what has been the status for these projects between 2 dates, which are 'String'. in that case how can we do it

 

AdithyaVar
Frequent Visitor

@amitchandak , 

@Greg_Deckler ,

@parry2k 

 

Any help on this would be great

@AdithyaVar , If they are select as range using a date table.

A measure

//Difference between two selected dates, Assume range as been selected. A date table
diff =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = maxx(allselected('Date'),'Date'[Date])
return
if( calculate( Max(Table[Status]), filter('Date', 'Date'[Date]=_min )) <>
calculate( Max(Table[Status]), filter('Date', 'Date'[Date] =_max )) , "Changed", "Same")

 

 

Or refer if you need two period

 

How to use two Date/Period slicers

https://youtu.be/WSeZr_-MiTg

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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