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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Young_G_Han
Helper III
Helper III

Add Ranking in a summarized table, but duplicated.

  Hi.

 

I made a summarized table with the following dax. However, there are some duplicated rankings even if the values are not similar.

Can you help me to solve the problem?

 

Ranking - Region =

VAR _month = MONTH(TODAY())
VAR _year = YEAR(TODAY())
VAR _RefYear = IF(_month > 6, _year, _year - 1)

RETURN
ADDCOLUMNS(
    SUMMARIZE(
        FILTER(
            '_SALES',
            (YEAR('_SALES'[Transaction Date]) = _RefYear &&
            RELATED(_CUSTOMER[Division Code]) IN {"1", "2", "3"} &&
            RELATED(_GROUP[Product Group Code]) = "A") &&
            '_SALES'[USD] > 0
        ),
        _CUSTOMER[Region Index],
        "Sales", SUM('_SALES'[USD]),
        "Year", _RefYear
    ),
    "Region Rank",
    RANKX(
        SUMMARIZE(
            FILTER(
                '_SALES',
                (YEAR('_SALES'[Transaction Date]) = _RefYear &&
                RELATED(_CUSTOMER[Division Code]) IN {"1", "2", "3"} &&
                RELATED(_GROUP[Product Group Code]) = "A") &&
                '_SALES DATA'[USD] > 0
            ),
            _CUSTOMER[Region Index],
            "Sales", SUM('_SALES DATA'[USD])
        ),
        [Sales],
        ,
        DESC,
        DENSE
    )
)
 
Region Index is a unique value in text.
Example result,
 
Region Index   Ranking  Sales
A                      20           4541889.2
B                      20           4681260.92
 
I don't think the A and B regions are the same ranking.
Please help me to solve this problem.
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Young_G_Han ,

 

Please share sample data in one drive and paste the link here to explore further.

 

Cheers

 

CheenuSing

View solution in original post

2 REPLIES 2
Young_G_Han
Helper III
Helper III

  Dear Sir.

 

The measure was correct for me. I just made a mistake.

 

Thank you.

Anonymous
Not applicable

Hi @Young_G_Han ,

 

Please share sample data in one drive and paste the link here to explore further.

 

Cheers

 

CheenuSing

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

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

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.