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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.