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

Calculation Group in combination with SELECTEDVALUE

I am currently using calculation groups which are working perfectly. One of the requirements is to generate a title dynamically based on the calcuation item selected. (e.g. Year to date, Previous year, ...). To achieve this I am using the SELECTEDVALUE function in combination with my calculation group name. 

 

What I noticed is that this working fine, except for calculation items which include a mathematical function like minus, plus, ... This is generating an error in my report. The error says: "Cannot convert value "year over year" of type Text to type Numeric/Date. It seems that it want's to use the calculation item name in the formula, which offcourse won't work.

 

I created the calculation group with Tabular Editor. 

 

I did a lot of tests and my conclusion is that it is a bug, but I would like to hear for others if they experience the same and maybe know a workaround. 

4 REPLIES 4
OlapOffice
Helper II
Helper II

Spoiler
I am having a similar issue Calculation Groups Causing Measure Dynamic Titles ... - Microsoft Power BI Community Did the parameter table resolve the issue?

TomMartens
Super User
Super User

Hey @verscev ,

 

I have to admit, that I do not understand what you are trying to achieve.

 

Please consider creating a pbix that contains sample data but still reflect your data model (at least to recreate the issue).

Upload the pbix to onedrive or dropbox and share the link.

Provide information about the build Power BI Desktop and Tabular Editor.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hello @TomMartens ,

 

I created a simplified pbix file, but it also gives me the same error. I also added some images to better explain what is going on.

 

Link ondrive: https://1drv.ms/u/s!AlG7DRHIa-Gog7gTFikly-53PyzNzQ?e=Seszs7

Hi @verscev ,

 

Could you pls advise me your dax expression for the table:Time intelligence?

 

You may also find the error details via below steps:

Click view>Performance Analyzer>Starts recording>Card>Copy query:

 

Screenshot 2020-10-22 151841.pngScreenshot 2020-10-22 151948.png

And open dax studio,paste the query in it,you will see what happens.

You may check the blog here:

https://www.sqlbi.com/articles/using-calculation-groups-to-selectively-replace-measures-in-dax-expre...

 

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

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.