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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Beniya_Samson
Frequent Visitor

Period Comparison Growth Category

Dear All,

I really need a help regarding Growth Category based on my growth % (Period Comparison). I have created Period1 and Period 2 measures and I have created a measure for Growth %.  But I want to create Category based on my Growth%. Since Growth% is a measure (Row Context) I coundnt Achieve what am expecting.

I have created two Tables Date 1, 

I have created the following measures:

Sales = SUM('demo'[total_sales])
Period 1 = CALCULATE([Sales],KEEPFILTERS(TREATAS(VALUES('Date 1'[invoice_date]),'demo'[invoice_date])))
Period 2 = CALCULATE([Sales],KEEPFILTERS(TREATAS(VALUES('Date 2'[invoice_date]),'demo'[invoice_date])))
Growth % = IF([Period 1]<>0,([Period 2]-[Period 1])/[Period 1],
                        IF(AND([Period 1]=0,[Period 2]=0), 0,
                            IF(AND([Period 1]=0,[Period 2]<>0),[Period 2],
                               IF([Period 1]=[Period 2],0
                              )
                      )))
 
This is what I want to achieve to see how many stores falls into the respective category. The below mentioned Table is the one am expecting.
Growth Category = IF([Growth %] < -0.50, "-50+",
IF(AND([Growth %] < -0.25,[Growth %] >= -0.50), "-50 to -26",
IF(AND([Growth %] < 0,[Growth %] >= -0.25), "-25 to -1",
IF(AND([Growth %] > 0,[Growth %] <= 0.25), "0 to 25",
IF(AND([Growth %] > 0.25,[Growth %] <= 0.50), "26 to 50",
IF([Growth %] > 0.50, "51+",
IF([Growth %] = 0.00, "Zero Growth", "Zero Sales"
)
))))))
Growth Category-50+-50 to -26-25 to -10 to 2526 to 5050+
No.of.Stores71551812

5

 

Thank you.

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @Beniya_Samson ;

You could change the [Growth Category ] to column or you need add a new table like this.

AilsaTao_0-1661224398224.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Beniya_Samson , Are you trying something like that

Power BI Abstract Thesis: How to use two Date/Period slicers

https://youtu.be/WSeZr_-MiTg

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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