cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
YavuzDuran
Helper I
Helper I

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
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!