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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
ase
Frequent Visitor

DAX function that fills a column with one of my current values and leaves the rest of rows blank

Hi all,

 

I don't even know how to explain my issue. I need a DAX function that will sort the Price for the month by product and leave all the other rows blank. 

 

Current data   Expected Result  
 Product Price for the month  Product Price for the month
 Iphone 13 300  Iphone 13 300
 Iphone 13 300  Iphone 13  
 Iphone 141000  Iphone 14 1000
 Iphone 14 1000  Iphone 14  

 

Is anyone able to help?

 

KR,

B

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi,

I assume your table contains one more column that indicates the difference between the same product, for instance, date column or index column.

I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

It is for creating a new table.

 

Data table

Jihwan_Kim_0-1682910719391.png

 

Expected result table

Jihwan_Kim_1-1682911487466.png

 

Expected result table = 
SUMMARIZE (
    ADDCOLUMNS (
        ADDCOLUMNS (
            SUMMARIZE ( Data, Data[Index], Data[Product], Data[Price for the month] ),
            "@indexmin", MINX ( FILTER ( Data, Data[Product] = EARLIER ( Data[Product] ) ), Data[Index] )
        ),
        "@Price for the month", IF ( Data[Index] = [@indexmin], Data[Price for the month] )
    ),
    Data[Product],
    [@Price for the month]
)

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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