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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply

Measure to get last month of a quarter when selected from a Quarter slicer

Hello community, 

 

My doubt is that have a columns of Quarter and Period. Took a slicer and dragged Quarter & Period. Whenever I select Q1 in a slicer, it should select only P03(instead of P01, P02&P03), when i selected Q2, it should select only P06, similarly for Q3, it should select only P09 and for Q4, it should select only P12. 

 

Regards, 

Krishnakanth

1 ACCEPTED SOLUTION

Hi @krishnakantht7 ,

Did you get your expected result? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

yingyinr_0-1657614380403.png

Best Regards

Community Support Team _ Rena
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

6 REPLIES 6

Ok Thank you

 

Sent you a request in Linkedin with Name Thummalacherla Krishnakanth

16572486032451531583767981711471.jpg

 Like this error it is displaying when I'm trying

How can i help with by just looking at an image?


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

Ok Ashish, 

Got the code. Tried today. 

Code:

IHC2(1) =

var v1=SWITCH(
    TRUE(),
    SELECTEDVALUE(Headcount[Quarter])="Q1"calculate(sum(Headcount[Internal Headcount]), Headcount[Period]="P03"),
SELECTEDVALUE(Headcount[Quarter])="Q2",calculate(sum(Headcount[Internal Headcount]), Headcount[Period]="P06"),
SELECTEDVALUE(Headcount[Quarter])="Q3",calculate(sum(Headcount[Internal Headcount]), Headcount[Period]="P09"),
            SELECTEDVALUE(Headcount[Quarter])="Q4"calculate(sum(Headcount[Internal Headcount]), Headcount[Period]="P12")
            )
             var v2=IF(ISFILTERED(Headcount[Quarter]), v1calculate(sum(Headcount[Internal Headcount]), Headcount[Period]="P12"))
             RETURN
             v2
 

Hi @krishnakantht7 ,

Did you get your expected result? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

yingyinr_0-1657614380403.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello yingyinr,


It has helped me.

 

Thank you.

 

Regards,

Krishnakanth

 

Ashish_Mathur
Super User
Super User

Hi,

You should create a Calendar Table with columns there for Year, Quarter and Period.  In your source data table, ensure you have a proper Date column and if you do not have one, then create one with the information you have in ther other columns.

Thereafter you should be able to write a measure with functions such as datesbetween(), max() and calculate().

If you need an further help, then share the link from where i can download your PBI file and show the expected result very clearly.


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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.