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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Knast
Microsoft Employee
Microsoft Employee

Compare Sell-through of 2 Stores within one Table-Visual

Hi there,

I want to compare the Sell-through of several stores with their counterparts within 1 Row of a Table visual.

I have DIM_Outles matched with  FACT_Sell-through via Oultet_ID
Now a few of the Stores have a compare Store and I added the Info within the DIM_Outlets.

the "Focus Store comparison" is what I want to create.

Sample Data: https://1drv.ms/u/s!AqT0loog1WXMjpFcbrKfGUo3WTQYkQ?e=QOtBHB

Screenshot (56).png

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Knast 
Here is a sample file with the proposed solution https://www.dropbox.com/t/KkeqN6eamKqnpUvZ

VS. Compare Store = 
VAR CurrentSellThrough = 
    SUM ( 'FACT_Sell-through'[Sell-through] )
VAR CompareSellThrough =
    CALCULATE ( 
        SUM ('FACT_Sell-through'[Sell-through] ),
        TREATAS ( VALUES ( Dim_Outlets[Compare_Outlet_ID] ), Dim_Outlets[Outlet_ID] )
    )
RETURN
    CurrentSellThrough - CompareSellThrough

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @Knast 
Here is a sample file with the proposed solution https://www.dropbox.com/t/KkeqN6eamKqnpUvZ

VS. Compare Store = 
VAR CurrentSellThrough = 
    SUM ( 'FACT_Sell-through'[Sell-through] )
VAR CompareSellThrough =
    CALCULATE ( 
        SUM ('FACT_Sell-through'[Sell-through] ),
        TREATAS ( VALUES ( Dim_Outlets[Compare_Outlet_ID] ), Dim_Outlets[Outlet_ID] )
    )
RETURN
    CurrentSellThrough - CompareSellThrough
Knast
Microsoft Employee
Microsoft Employee

@tamerj1 worked! Thx a lot!

daXtreme
Solution Sage
Solution Sage

@Knast 

 

Please supply some example data to work with. In text form, so that it's easy to copy. If you can share a file (via Dropbox or Google Drive, for instance) with such data, even better. Thanks.

Knast
Microsoft Employee
Microsoft Employee

i added a link with example data - https://1drv.ms/u/s!AqT0loog1WXMjpFcbrKfGUo3WTQYkQ?e=QOtBHB

 

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.