Forum Discussion

c_avu's avatar
c_avu
Frequent Visitor
1 year ago

Microsoft Fabrics multiple Calculation Groups in report

Hello,


Kind of new with this fabrics and powerbi

I have a usecase I need to group measure into groups. So i'm using calculation groups in semantic model.

 

Calculation Group one:

created a measuregroup 'mgcosts'

and created 3 measures in it, 'cost eur', 'cost usd', 'cost localcurrency'

and a selectedmeasure 'smcost = selectedmeasure()'

 

Calculation Group two:

created a measuregroup'mgquant'

and created 2 measures in it, 'volume', 'units'.
and a selectedmeasure 'smquant = selectedmeasure()'

In my report, I used matrix chart
Rows: I used some titles from dimension tables
Columns: measuregroups --> mgcosts, mgquant
values: smquant, smcosts

 

and I have two chicklet slicers for both mgcosts, mgquant

idea is,
if i select a measure 'cost eur' and 'cost usd' in 1st chiclet slicer, 'volume' from second
expected matrix is like below

+----------|---------------------------------+
| Product   | cost eur | cost usd  | volume  |
+----------|----------------------|----------|
|Product A |              |                 |              |
|Product B |              |                 |              |
|Product C |              |                 |              |
|Product D |              |                 |              |
+----------|------------------------------+


But it is not what i'm getting like i wanted,

I'm getting like below

+----------------------------------|-----------------------+
| mgcosts   | cost eur                   | cost usd                   |
| Product    | smcost  | smquant  | smcost | smquant     |
+-----------|----------------------|------------------------|
|Product A  |              |                 |              |                     |
|Product B  |              |                 |              |                     |
|Product C  |              |                 |              |                     |
|Product D  |              |                 |              |                     |
+-----------|----------------------|-----------------------+


can anyone please point me what i'm doing wrong here ?

Many Thanks

 

 

 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi c_avu ,

     

    It seems that your add [cost eur]/[cost usd] in matrix column fields, and add [smcost]/[smquant] in value fields. So your matrix will be expanded. 

    Your issue is based on data model. I suggest you to share a sample pbix file with us and show us a screenshot with the result you want. It will make it easier for us to find the solution.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • c_avu's avatar
      c_avu
      Frequent Visitor

      I need both [smcost] [smquant] in columns

      Semantic ModelReportDesired output matrix

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi c_avu ,

         

        According to your statement, I think you add these two parameters in column fields as hierarchy level.

        So when you drill down it will show as below.

        Did you use field parameter in Power BI to create the calculation group?

        For reference: Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn

        I think you can combine the group as one and then try again.

        If this reply still couldn't help you solve your issue, please share a sample file with us.

         

        Best Regards,
        Rico Zhou

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.