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
ss
Frequent Visitor

Filter based on two date dimension

I have 2 date dimensions

  • Accounting Period
  • Forecast Period

And [Revenue Data] table with measures

 

Problem:

In the following screenshot I have filtered (slicer) on Accounting Period 2017 Mar, this will list all the Forecast Period (basically each Accounting Period will have 12 Forecast Periods of same year) and the YTD measure

 image.png 

 

The following is exactly the same but I have filtered (slicer) on Accounting Period 2017 Jun

image.png

I wanted [YTD Last Quarter] measure - I used PREVIOUSQUARTER function

 

 image.png

 

YTD Last Quarter gives me, for example, In 2017 Jun Accounting Period as filtered in slicer - The Revenue YTD of 2017 Jun Forecast Period as in 2017 Mar Accounting Period (Mar is the previous quarter). So far all good, I get the correct number

 

Now I just need to get that particular line alone in the visual (as highlighted above with arrow). I thought it was as simple as adding a calculated column IF(Accounting Period = Forecast Period, TRUE(), FALSE() ) and then add that slicer.

 

But Calculated column isn't working as you can see in below screenshot.

  • For YTD it filters on 2017 Jun because that’s True
  • For YTD Last Quarter it filters on 2017 Mar - because in 2017 Mar Accounting Period that was True

 image.png

 I tried to create relationship between Accounting Period and Forecast Period but ended up with ambigous path error.

 

 

My desired result is following - somehow just need to get that line alone where Accounting Period = Forecast Period with respective measures

 image.png

 

Any idea please - Thank you.

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @ss,

 

I'm not so clear for your table structure, relationship and formula, can you please share some sample data for testing and coding formula?

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.