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

Time Intelligence Calculation Group not working with my simple measure - Help

Hello,

 

I have a Time Intelligence calculation group with CY, PY, YoY, YoY %

The calculated group itself its fine, I made it with a tutorial and works with other measures, but not this one:

 

Increase =
VAR CY = 'Measures Table'[Sales]
VAR PY = CALCULATE('Measures Table'[Sales],SAMEPERIODLASTYEAR('Date'[Date]))
RETURN
SWITCH ( TRUE (),PY > 0 && CY > 0 && PY < CY, 'Measures Table'[Sales], BLANK ())
 
It only shows the CY column of the calculation group
How can I fix it?
1 ACCEPTED SOLUTION

@andresloji , have you created calculation groups in tabular editor?

 

then something is wrong, because when you take group name, you should see all 4

 

calculation groups
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@andresloji , This does seem like a calculation group?

 

This measure will give you CY when both CY and PY > 0 and CY > PY

 

Increase =
VAR CY = [Sales]
VAR PY = CALCULATE([Sales],SAMEPERIODLASTYEAR('Date'[Date]))
RETURN
SWITCH ( TRUE (),not(isblank(PY)) && PY > 0 && not(isblank(CY)) && CY > 0 && PY < CY, [Sales], BLANK ())

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

@amitchandak 
Here is an image of 2 matrix

Both of them are using the Time Intelligence calculation group as columns, and Partner Names as rows
The one on the left uses Sales as Values

The one on the right uses the Increase meassure mentioned above

 

As you can see, with the Increase meassure, I can only see one column: CY
I need to see all the columns of the calculation group
Sales.png

@andresloji , have you created calculation groups in tabular editor?

 

then something is wrong, because when you take group name, you should see all 4

 

calculation groups
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

 

@amitchandak I created the calculation group exactly as in the link you sent, with tabular editor.

It still does not work

@amitchandak Thank you, I'll take a look at the calculation groups again!

You are awesome!

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors
Top Kudoed Authors