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

ParallelPeriod for Half Year (Semester) in DAX

Hi all, 

 

I need to create some measure with calculation for value in previous period. 

I have two cases: Previous Quarter and Previous Half Year. 

 

In first case I'm using simple function: CALCULATE([SomeValue],PARALLELPERIOD(SurveyDate[Date],-1,QUARTER))

But how I can do it with semester? on ParallePeriod I can use only YEAR, QUARTER and MONTH. 

I can not use PARALLELPERIOD(SurveyDate[Date],-2,QUARTER because it still will work on quarter level and will bring me calculation for quarter level and not for half year. 

 

My Date Hierarchy looks like Month-Quarter-Half Year - Year

 

I`m sure that such kind of business question is quite common so I`m sure that there is some workaround for it. 

 

Thanks a lot!

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @kirkademidov,

 

It would be better you could provide some dummy data. Especially, please show us what is "Half Year"?

 

Regards,

Yuliana Gu

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

@kirkademidov,

 

How did you define [Half Year] in your table? Are you using a Calendar table or are you using the fact table date column?

 

What if you had [Half Year Key] that you could base your calculation off of instead of PARALLELPERIOD.

 

For example, something like:
CALCULATE ( [SomeValue], 'tablename'[Half Year Key you're trying to get] )

 






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



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.