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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register 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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.