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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

3 file with common file with price range parameter

 

Hi Friends,

 

I have 3 files and 1  of this is connecting file. The masterfile (relationship). 

 

Now, 1 need a DAX that will determine or create report base on different category with different  price range base.  using this 3 file

 

Category will be the basis of price range. 

i want get total sold qty per category per price range. Hope you can help me.

 

 

 

FIRST FILE (MASTERFILE)

 

FILE 1.PNG

 

FILE 2 (with relationship in file 1 using item column)

 

 

FILE 2.png

 

 

FILE 3

 

FILE 3.png

 

now need a DAX that will determine or create report base on different category with different  price range base.  using this 3 file

 

Category will be the basis of price range. 

i want get total sold qty per category per price range. Hope you can help me.

 

 

thank you so much in advance,

 

6 REPLIES 6
Greg_Deckler
Super User
Super User

Can you post this as data that can be copied and pasted? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler,

 

I have 3 files and 1  of this is connecting file. The masterfile (relationship). 

 

Now, 1 need a DAX that will determine or create report base on different category with different  price range base.  using this 3 file

 

 

 

FIRST FILE:

ITEM         CATEGORY         CATEGORY 2

APPLE        FRUITS               ORANGE

BANANa    FRUITS                YELLOW

GRAPES     FRUITS                PURPLE

CHEERY     FRUITS                RED

CAT          ANIMAL               BLACK

DOG         ANIMAL               WHITE

DOVE       ANIMAL               WHITE

FISH         ANIMAL               ORANGE

DRESS     CLOTHES              BLUE

PANTS     CLOTHES             DEMIN

SKIRT       CLOTHES             GREEN

GOWN     CLOTHES             YELLOW

 

FILE 2 (with relationship in file 1 using item column)

 

ITEM               PRICE                  QTY SOLD       

APPLES           300                        4                        

BANANA        450                        2       

DOG               15000                    8

CAT                 700                        2

PANTS              50                       7

GOWN              1000                  10             

 

 

FILE 3

 

CATEGORY         RANGES                     MIN                MAX

FRUITS                 ENTRY                         0                  300

FRUITS                 MID                            301               999

FRUITS                 HIGH                         1000                above

ANIMAL               ENTRY                         0                  5000

ANIMAL               MID                           5001            10000

ANIMAL               HIGH                         10001           ABOVE

CLOTHES             ENTRY                          0                 500

CLOTHES             MID                             501              5000

CLOTHES             HIGH                           5001            ABOVE

 

 

Category will be the basis of price range. 

i want get total sold qty per category per price range. Hope you can help me.

 

 

@Anonymous,

 

You may refer to the measure below.

Measure =
SUMX (
    FILTER (
        Table2,
        RELATED ( Table1[CATEGORY] ) = SELECTEDVALUE ( Table3[CATEGORY] )
            && Table2[PRICE] >= SELECTEDVALUE ( Table3[MIN] )
            && (
                ISBLANK ( SELECTEDVALUE ( Table3[MAX] ) )
                    || Table2[PRICE] <= SELECTEDVALUE ( Table3[MAX] )
            )
    ),
    Table2[ QTY SOLD]
)
    + 0
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-chuncz-msft,

 

solution is invalid. 

 

1. i cant create relationship the 2 table table 2 and 3 reason no unique values.

 

Please help. DO i need to rearrange my price range table?

 

 

thank you,

 

Eannecute

@Anonymous,

 

The relationship is between Table1 and Table2.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-chuncz-msft,

 

Error encountered,

 

cant display the visual.

 

 

 

Thank you,

 

Eannecute

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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