Forum Discussion

drew989898's avatar
drew989898
Frequent Visitor
3 months ago
Solved

Using Visual Calculation on a Calculated Group with Multiple Calculated Items

Hi,

 

I was wondering if anyone has had any success using the "New Visual Calculation (Preview)" feature yet on Calculated Groups? Particularly with Calculated Groups that have multiple items? With visual calculations they do actually enable the selection of calculation groups as a column, but not the selection of a specific item from that group, at least I haven't found how to do this, but if it's possible that might be the solution I need.

 

Background

 

I was able to use the feature to produce a nicely working variance in a table of months that would look and one column and take the current row value and subtract the previous row value. It was as simple as this:

% YTD Variance = IF( PREVIOUS([% YTD Utilisation]) = 0, 0, [% YTD Utilisation] - PREVIOUS([% YTD Utilisation]) ) * 100

I couldn't figure out a way to do it otherwise in this row filter context, and it was so simple with the new feature.
 
However, I was asked to introduce a way to filter the entire dashboard by two variations on the same input: one without modification and the other with modification. This means essentially passing different parameters (columns) into the same measure based on what the user has selected from the filter. Calculation groups enable this. So I had to take my existing measures and get them to work within calculation groups, with each group having multiple items.
 
They work fine, except in 2 cases where my original dashboard used these visual calculation features. Can it work with calculated groups?

Thanks. I hope at least this is a good question.
  • drew989898 Hi!

    I don’t think visual calculations currently support directly selecting a specific calculation item from a calculation group inside the visual calculation expression. The calc group column can be added to the visual, but the visual calculation only sees the resulting visual structure, not the individual calculation items as separate selectable objects.

    The workaround I’d use is to create explicit wrapper measures with CALCULATE() that force the required calculation item, then use those measures in the visual calculation. That gives the visual calculation a normal measure/column to reference, while the calculation group logic still stays centralized.

     

    BBF


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

    👍 Kudos are appreciated

    🔥 Proud to be a Super User!

4 Replies

  • drew989898 Hi!

    I don’t think visual calculations currently support directly selecting a specific calculation item from a calculation group inside the visual calculation expression. The calc group column can be added to the visual, but the visual calculation only sees the resulting visual structure, not the individual calculation items as separate selectable objects.

    The workaround I’d use is to create explicit wrapper measures with CALCULATE() that force the required calculation item, then use those measures in the visual calculation. That gives the visual calculation a normal measure/column to reference, while the calculation group logic still stays centralized.

     

    BBF


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

    👍 Kudos are appreciated

    🔥 Proud to be a Super User!

  • The whole point of visual calculations is that they cannot reach back into the data model.  Like window functions, visual calculations operate on a static snapshot (in this case the result of the DAX query that fetched the data to be rendered).

  • Thankyou, BeaBF and lbendlin for your responses.

    Hi drew989898,

    We appreciate your inquiry through the Microsoft Fabric Community Forum.

    We would like to inquire whether have you got the chance to check the solutions provided by BeaBF and lbendlin to resolve the issue. We hope the information provided helps to clear the query. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.

    Thank you.

  • Hi drew989898,

    We are following up to see if what we shared solved your issue. If you need more support, please reach out to the Microsoft Fabric community.

    Thank you.