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
cristianml
Post Prodigy
Post Prodigy

Calculate Fiscal Quarter all except a column string/value variable

Hi,

I need help with a measure. I'm trying to calculate the Starting revenue value for each quarter/period filtered.

I have the Q1 with V2  but then I have to apply the filter using ALLEXCEPT or ALL and then filter again ..

 

cristianml_2-1652504700376.png

Expecting result:

cristianml_3-1652505216029.png

 

 

cristianml_0-1652504558971.png

 

__ STARTING Q REVENUE =
VAR V1 = SELECTEDVALUE('Calendar'[FY & Q])
VAR V2 = LEFT(V1,6) & "1"
VAR V3 = [_Actual + Backlog Rev]
RETURN
CALCULATE(V3,ALLEXCEPT('Calendar','Calendar'[FY & Q]),'Calendar'[FY & Q]=V2)
 
I know I'm close with this measure but is not working at the moment. 
 
Hope you can help me.

 

 

1 ACCEPTED SOLUTION
cristianml
Post Prodigy
Post Prodigy

I found the solution:

 

__STARTING Q REVENUE =
VAR _Quarter = SELECTEDVALUE ( 'Calendar'[FY & Q] )
VAR _Start = CALCULATE ( MIN ( 'Calendar'[Date] ), ALL ( 'Calendar' ), 'Calendar'[FY & Q] = _Quarter )
RETURN
CALCULATE (
[_Actual Rev],
DATESINPERIOD ( Calendar[Date], _Start, 3, MONTH )
)
)
 
cristianml_1-1652545408505.png

 


 

View solution in original post

5 REPLIES 5
cristianml
Post Prodigy
Post Prodigy

I found the solution:

 

__STARTING Q REVENUE =
VAR _Quarter = SELECTEDVALUE ( 'Calendar'[FY & Q] )
VAR _Start = CALCULATE ( MIN ( 'Calendar'[Date] ), ALL ( 'Calendar' ), 'Calendar'[FY & Q] = _Quarter )
RETURN
CALCULATE (
[_Actual Rev],
DATESINPERIOD ( Calendar[Date], _Start, 3, MONTH )
)
)
 
cristianml_1-1652545408505.png

 


 

Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.  When does your FY start?  Do you have a Date column in your raw dataset?


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

Hi,

Share the link from where i can download your PBI file.  When does your FY start?  Do you have a Date column in your raw dataset?


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

Hi @Ashish_Mathur ,

 

I can´t share the file. And yes I have a date table:  

cristianml_0-1652506190777.png

 

cristianml_1-1652506301602.png

 

I'm not sure why you need when date start. I don't want to hardcode the measure. The criteria should be that the start Q is the one that ends with 1.

That´s why I use VAR1 and VAR2 that defines the first Quarter of that point in time/period.

 

And with that I need to filter but not sure how to use ALLEXCEPT/ALL/FILTER, etc in that last part.

 

 

 

 

 

 

I will need data to work with.  Anonymise the data, if feasible.


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

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.