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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors