Ali Kate Flesch
Ali Kate Flesch

Reputation: 73

A Power BI measure that displays whether a quarter is an actual or estimate

I am working to create a measure in Power BI that will allow me to track whether each quarter in the fiscal year is in work or complete.

Right now, I have a measures that calculate:

  1. Fiscal Quarter of each month in my table (My fiscal year is 10/1-9/31)

    Quarters = if(Month([Date]) >= 10, "Q1",  if(Month([Date]) <= 3, "Q2",
    if(Month([Date]) <= 6, "Q3",  "Q4"))) 
    
  2. Current Fiscal Quarter

    current Quarter = if(Month(TODAY()) >= 10, "Q1", if(Month(TODAY()) < 4, "Q2",
    if(Month(TODAY()) < 7, "Q3", "Q4")))
    
  3. Current Month

    Current Month = MONTH(TODAY())
    

I want a calculated column or measure that does the following:

Basically, if a quarter is still in progress, the measure should display Q_ - Estimate, and if the quarter is complete or has not yet begun, it should display Q_ - Actual

So for example, we are in quarter 4 right now, so the measure should display Q4 - Estimate for Q4, and Q1 - Actual, Q2 - Actual, and Q3 - Actual since Q1-Q3 are complete. The end goal is to have these labels on the x-axis for the following graph:

x-axis quarter example

I have attempted some IF statements, but keep getting stuck since each quarter must assume one of two values.

I want the following:

IF([current quarter] = "Q4", "Q4 - Estimate", "Q4 - Actual")... but for every quarter.

Is it possible to accomplish this in one IF statement? If not, how might I tackle this?

Thank you for your help.

Upvotes: 1

Views: 1175

Answers (1)

Marco Vos
Marco Vos

Reputation: 2968

How about this:

[column] = IF([Quarters]=[current quarter],[Quarters] & " - estimate",[Quarters] & " - Actual")

Upvotes: 1

Related Questions