Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Syndicate_Admin
Administrator
Administrator

calculation within matrix

Hello community!

I am trying to create an array that contains the availability of certain applications, however I have some applications that have modules, for example Microsoft:

max220_2-1641846105732.png

The relationships I am applying are directly from a data specification with the general name of the application and a secondary relationship with the modules but I cannot get the measurements to bring me the correct calculations to the matrix.

max220_0-1641846680711.png

cmdb ci = Microsoft

Module = Exchange, OneDrive, Sharepoint y Teams

These are the formulas that I am applying for each measure:

  • Av DB Prev Month = 1 - CALCULATE(SUM('Availability DB'[Av DB Outage Availability Montly]),DATEADD('Calendar'[Date], -1, MONTH))
  • Av DB MTD = 1 - SUM('Availability DB'[Av DB Outage Availability Montly])
  • Av DB QTD = 1 - CALCULATE(SUM('Availability DB'[Av DB Outage Availability Montly]),DATESQTD('Calendar'[Date]))
  • Av DB YTD = 1 - CALCULATE(SUM('Availability DB'[Av DB Outage Availability Yearly]),DATESYTD('Calendar'[Date]))

I am not sure if they are I must change the relationships, create hierarchies or modify the formulas so that I take into consideration the modules.

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

 

You need to enable secondary relationship with the modules using the USERELATIONSHIP function in your formula, like this:

 

Av DB Prev Month = 1 - CALCULATE(SUM('Availability DB'[Av DB Outage Availability Montly]),DATEADD('Calendar'[Date], -1, MONTH), USERELATIONSHIP('Availability DB'[Module], 'Bucket Data Specifically'[Module]))
Av DB MTD = 1 - CALCULATE( SUM('Availability DB'[Av DB Outage Availability Montly]), USERELATIONSHIP('Availability DB'[Module], 'Bucket Data Specifically'[Module]))
Av DB QTD = 1 - CALCULATE(SUM('Availability DB'[Av DB Outage Availability Montly]),DATESQTD('Calendar'[Date]), USERELATIONSHIP('Availability DB'[Module], 'Bucket Data Specifically'[Module]))
Av DB YTD = 1 - CALCULATE(SUM('Availability DB'[Av DB Outage Availability Yearly]),DATESYTD('Calendar'[Date]), USERELATIONSHIP('Availability DB'[Module], 'Bucket Data Specifically'[Module]))

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

 

You need to enable secondary relationship with the modules using the USERELATIONSHIP function in your formula, like this:

 

Av DB Prev Month = 1 - CALCULATE(SUM('Availability DB'[Av DB Outage Availability Montly]),DATEADD('Calendar'[Date], -1, MONTH), USERELATIONSHIP('Availability DB'[Module], 'Bucket Data Specifically'[Module]))
Av DB MTD = 1 - CALCULATE( SUM('Availability DB'[Av DB Outage Availability Montly]), USERELATIONSHIP('Availability DB'[Module], 'Bucket Data Specifically'[Module]))
Av DB QTD = 1 - CALCULATE(SUM('Availability DB'[Av DB Outage Availability Montly]),DATESQTD('Calendar'[Date]), USERELATIONSHIP('Availability DB'[Module], 'Bucket Data Specifically'[Module]))
Av DB YTD = 1 - CALCULATE(SUM('Availability DB'[Av DB Outage Availability Yearly]),DATESYTD('Calendar'[Date]), USERELATIONSHIP('Availability DB'[Module], 'Bucket Data Specifically'[Module]))

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks a lot!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.