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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AshDil
Helper V
Helper V

Want new row from existing rows

Hi,

I have data as follows:

AshDil_0-1626314652513.png

Cateogy in (A,L,I,B) comes under EAST segment, category in (K) comes under WEST segment, category in (N) comes under NORTH segment and category in (K,N) comes under CENTRAL segment (sum of WEST and NORTH segments), so I have written as follows:

AshDil_1-1626315449189.png

I'm not getting the following when using above column

AshDil_2-1626315535434.png

But I want to show as follows

AshDil_3-1626315964185.png

Please help me to do.

Thanks,
AshDil.

 

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi @AshDil ,

 

You can create the following by enter data:

Capture11.PNG

 

Then use the following measure:

 

Measure = CALCULATE(SUM('Table'[Sales]),TREATAS(VALUES(Table2[Category]),'Table'[Category]))

 

Capture12.PNG

 

For more details, please refer to the pbix file.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

View solution in original post

2 REPLIES 2
v-deddai1-msft
Community Support
Community Support

Hi @AshDil ,

 

You can create the following by enter data:

Capture11.PNG

 

Then use the following measure:

 

Measure = CALCULATE(SUM('Table'[Sales]),TREATAS(VALUES(Table2[Category]),'Table'[Category]))

 

Capture12.PNG

 

For more details, please refer to the pbix file.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

amitchandak
Super User
Super User

@AshDil , The last statement needs to be in {"K","N"}.

 

But that will also not work. Create a table with category and segment, in that case, you can repeat the category for the segment. Join new table on category and then you will be able to repeated values

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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