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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
only_me321
Frequent Visitor

help me please!! need to create a new column based on other columns in power bi

table example

only_me321_0-1675066694184.png

I need this 

only_me321_1-1675066708756.png

The DAX I wrote is 

    New_Column = CALCULATE(MIN('table'[Sup_group]),FILTER(ALL('table'),
                                                                     'table'[province] = EARLIER('table'[province]) &&
                                                                     'Stable'[Quarter] = "Q1"))

The result is 

only_me321_2-1675066730544.png

    But I don't want this kind of result, I want like the first picture.

 

help me please,

thank you.

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @only_me321 
Please try

New_Column =
MINX (
    TOPN (
        1,
        CALCULATETABLE ( 'table', ALLEXCEPT ( 'table', 'table'[province] ) ),
        'Stable'[Quarter], ASC
    ),
    'table'[Sup_group]
)

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @only_me321 
Please try

New_Column =
MINX (
    TOPN (
        1,
        CALCULATETABLE ( 'table', ALLEXCEPT ( 'table', 'table'[province] ) ),
        'Stable'[Quarter], ASC
    ),
    'table'[Sup_group]
)

Oh, I can do it, just like you let me try. 😍

thank you, I tried to follow you result is  

only_me321_0-1675070459048.png

which i want like this

only_me321_1-1675070554598.png

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors