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
Jacekk111
Helper I
Helper I

Measure that sum up unique quantities grouped by 2 columns

Hi, I have problem with show the correct data on the graphs. I'm using measrue:

test =
CALCULATE (
    SUMX ( VALUES( SCRAP[DailyOutput] ), SCRAP[DailyOutput] ),
    ALLEXCEPT ( SCRAP, SCRAP[WorkCenterCode], SCRAP[Data] )
When I compare the value to sum up: 2511+1647+2592+2511 = 9261  but I got 6750. 
I see the problem in repeatable numbers: 2511
I can't find solution do adjust my measure to get correct output.

Jacekk111_0-1659509650849.png

 

1 ACCEPTED SOLUTION
Kaly
Resolver II
Resolver II

Hi @Jacekk111 ,

Glad you solved the problem by yourself! If you don't have other problems, would you mind accept your reply as solution? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

 

Best Regards,
Kaly

View solution in original post

5 REPLIES 5
Kaly
Resolver II
Resolver II

Hi @Jacekk111 ,

Glad you solved the problem by yourself! If you don't have other problems, would you mind accept your reply as solution? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

 

Best Regards,
Kaly

Jacekk111
Helper I
Helper I

Unfortunatly this not working as should be:

Jacekk111_0-1660028758345.png

The point line should be differ depending on area

Jacekk111_1-1660028839269.png

I figoure out by creation properl agregation in power query as individual table and next conected by model.

 

 

Jacekk111
Helper I
Helper I

Thank You, but maybe I wasn't precise in my descritption as I should be. In column "Daily Output" I have daily production that is refere to every ID scrap input. If I use sum function I got sum all Scrap row but I need only sum up 1 daily output refers to area and date. In my fuction VALUES function makes to delete the same values (2511) but It should be sum up beacuse this is different day.

 

Jacekk111_0-1659521100753.png

 

PC2790
Community Champion
Community Champion

Is this what you are looking for?

PC2790_0-1659527359674.png

DesiredOutput = 
SUMX (
    SUMMARIZE (
        SCRAP,
        SCRAP[Area],
        SCRAP[Date],
        "Value", DISTINCT ( SCRAP[Daily Output] )
    ),
    [Value]
)
PC2790
Community Champion
Community Champion

Can you try:

test =
CALCULATE (
    SUM(SCRAP[DailyOutput] ),
    ALLEXCEPT ( SCRAPSCRAP[WorkCenterCode]SCRAP[Data] )

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.