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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
eliskac
Employee
Employee

Building report through ACM connector

Hi all,

 

I connected to the cost data via Azure Cost management connector in PBI desktop. My customer needs to build up a report where he'll see Charges against credit (adjustments), service overage and total charges per month. 

I looked into data model and tried to join two tables (Balance summary and Usage details) but I can't figure out through which column to join it because there's always M:N relationship.

 

Plus, I'm not sure how to calculate total charges (this column is in ACM PBI app but I can't see the detail of this measure).

 

Does anybody know how to calculate total charges and how to join the tables to get harges against credit (adjustments), service overage and total charges per month?

 

Thanks,

E.

6 REPLIES 6
v-yangliu-msft
Community Support
Community Support

Hi  @eliskac ,

You can create an Intermediate table to form a one-to-many method with the remaining two tables, and use the intermediate table to connect your model.

For example:

Table 1:

vyangliumsft_0-1634288449090.png

Table 2:

vyangliumsft_1-1634288449090.png

Form a many-to-many relationship;

vyangliumsft_2-1634288449091.png

Create an Intermediate table:

vyangliumsft_3-1634288449092.png

Then use Manager relationships to create the relationship between the table and the table, and the Intermediate table forms a one-to-many relationship with the other two tables:

vyangliumsft_4-1634288449096.png

After that, you can connect the intermediate table with your mode.

vyangliumsft_5-1634288449097.png

 

Best Regards,

Liu Yang

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

Hi @v-yangliu-msft 

 

thank you for your advice. I did this. I actually need to connect "Balance summary" table to "Usage details". There are no common columns in these tables so I needed to join it via "Pricesheets" table since the relationship between "Balance summary" and "Pricesheets" was already established by default. So I wanted to join "Pricesheets" and "Usage details" and here I had the problem with M:N relationship. So I etablished this intermediate table with one column "Part number" and my model looks like this. 

eliskac_0-1634301528143.png

However, when I built a visual and want to filter it by Date (from Usage details table) for which I created a slicer, it still doesn't work and doesn't filter by the date range I set up. It might be caused by the data under Contoso Demo EA account that I'm using. 

I just wanted you to have a look at this model view if you think it's correct. I also tried to change the direction of cross filter to work in both directions but it seemed it changed nothing in my case.

 

Thank you,

E.

 

v-yangliu-msft
Community Support
Community Support

Hi  @eliskac ,

 

You can upload the pbix file to the online drive, and then add the download link in the reply.

 

Best Regards,

Liu Yang

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

v-yangliu-msft
Community Support
Community Support

Hi  @eliskac ,

You can create relationships and see which column connects the two tables in the Manage relationships in the Model view

vyangliumsft_0-1633577315497.png

View relationship:

Enter the Manage relationships interface, you can see which columns are connected between the two tables

vyangliumsft_1-1633577315499.png

Create relationship:

Click New to enter the Create relationship interface, select two tables, and connect.

vyangliumsft_2-1633577315500.png

This is the link to the relevant documentation:

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-create-and-manage-relationships

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand

To calculate the total cost, can you try to create a calculated column and use the Sum() function to get it directly.

vyangliumsft_3-1633577315503.png

Regarding harges against credit (adjustments), service overage and total charges per month, it is not very clear if there is no data. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data, so that we can better help you solve.

 

Best Regards,

Liu Yang

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

Hi @v-yangliu-msft

thank you for the reply. 

 

Yes, I know that I can manage relationships in the model view. I need to create a new relationship but there were always columns with M:N relationship. I tried to create a separate table with a column that has only unique values and connect those two tables though this one, but it seems that it still doesn't work. I guess I will have to keep trying.

 

I'm using Contoso Demo EA account and I've connected this account to PBI via ACM connector. I can't figure out where to insert pbix here in the reply. 

 

Thank you,

E.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.