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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
YavuzDuran
Helper III
Helper III

SELECTEDVALUE - SLICER SELECTED & CARD SHOWING PREVIOUS MONTHS

I have two slicer showing 

 - Calender Year

 - Calender Month (Jan, Jun)

When I select a year and month, the card/table shows me the # of deals contracted.

What I am trying to see in that card/table is; when I select ie.Jun, I want to see the # of deals contracted in previous 3 months (Feb-Mar-Apr)

 

Here is the formula I put, but it shows blank

Witing for your help

Thank you 

 

Last 90 Days Contracted = if(or(month(SalesDashboard[Contract Date])=SELECTEDVALUE(Calender[Month])-1,or(month(SalesDashboard[Contract Date])=SELECTEDVALUE(Calender[Month])-2,month(SalesDashboard[Contract Date])=SELECTEDVALUE(Calender[Month])-3)),1,0)

4 REPLIES 4
v-luwang-msft
Community Support
Community Support

Hi @YavuzDuran ,

 

Has your problem been solved, if so, please consider Accept a correct reply as the solution to help others find it.

 

 

Best Regards
Lucien

v-luwang-msft
Community Support
Community Support

Hi @YavuzDuran ,

Use the following measure:

Last 90 Days Contracted =
VAR _select =
    SELECTEDVALUE ( Calender[Month] )
VAR RESULT =
    IF (
        _select
            >= MONTH ( SalesDashboard[Contract Date] ) - 3
            && _select
                <= MONTH ( SalesDashboard[Contract Date] ) - 1,
        1,
        0
    )
RETURN
    RESULT

 

If still not work ,could you pls share your pbix file?Remember to remove confident data.

 

Best Regards

Lucien

Ashish_Mathur
Super User
Super User

Also, the 3 months prior to June are March, April and May.  Share more details, if you need more help.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

Needs more context (pun slightly intended).  Please show your work - is that a calculated column, is it a measure?

 

Note that you can use || or IN {} instead of nested OR().

 

Please provide sample data in usable format (not as a picture) and show the expected outcome.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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