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