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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
jaweher899
Impactful Individual
Impactful Individual

wrong total

I've the following report https://1drv.ms/u/s!Amd7BXzYs7AVlx7RRKcucc1TBZ1F?e=v3mDNM

 

I've an issue with the total, how to correct it please?

jaweher899_0-1671560956615.png

 

 

2 ACCEPTED SOLUTIONS
bolfri
Solution Sage
Solution Sage

Another solution (if you're expecting a lot of combinations).

Your unpivoting should include Origination Credit USD. Then a table looks like this. You can also add Correct ColumNames check to make it easier:

Correct ColumnNames = 
AND(
    RELATED('Table'[ColumnNames])=[ColumnNames];
    RELATED('Table'[Originator])=Factsales_copy[Originator]
)

bolfri_0-1671562868283.png

Then the formula looks like this:

Correct totals 2 = 
SUMX(
    FILTER(Factsales_copy;Factsales_copy[Correct ColumnNames]=TRUE);
    Factsales_copy[Value] * Factsales_copy[Origination Credit USD]
    )

 





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

Proud to be a Super User!




View solution in original post

Ok, but in the sample data that you've provided [Origination Credit USD] is in the table. Anyway - this will still works fine. 🙂 Just change the refference from column to measure that you have.





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

Proud to be a Super User!




View solution in original post

4 REPLIES 4
bolfri
Solution Sage
Solution Sage

Another solution (if you're expecting a lot of combinations).

Your unpivoting should include Origination Credit USD. Then a table looks like this. You can also add Correct ColumNames check to make it easier:

Correct ColumnNames = 
AND(
    RELATED('Table'[ColumnNames])=[ColumnNames];
    RELATED('Table'[Originator])=Factsales_copy[Originator]
)

bolfri_0-1671562868283.png

Then the formula looks like this:

Correct totals 2 = 
SUMX(
    FILTER(Factsales_copy;Factsales_copy[Correct ColumnNames]=TRUE);
    Factsales_copy[Value] * Factsales_copy[Origination Credit USD]
    )

 





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

Proud to be a Super User!




jaweher899
Impactful Individual
Impactful Individual

Thank you for your reply, in the real project, the origination credit usd is a compex measure from different tables. 

Ok, but in the sample data that you've provided [Origination Credit USD] is in the table. Anyway - this will still works fine. 🙂 Just change the refference from column to measure that you have.





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

Proud to be a Super User!




bolfri
Solution Sage
Solution Sage

The question is: how many combinations you have in your data? If it's like in this sample onlr 4 columns then I suggest not to duplicate factsales and use one measure:

Correct totals = 
SUMX(
    Factsales;
    SWITCH(RELATED('Table'[ColumnNames]);
        "CF_ZK";[CF_ZK];
        "CF_SH";[CF_SH];
        "CF_GOS";[CF_GOS];
        "CF_EFY";[CF_EFY])*Factsales[Origination Credit USD])

bolfri_0-1671562260022.png

Tell me if you're expecting a lot of columns with values and originators - then I will prepare different solution for you.





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

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.