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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
RSSILVA_22
Helper I
Helper I

Assistance with sales by season view

I would like some help with the attached file.
In the first column (periodo_ativacao), I have the month in which sales were made.
In the first row, I have the total that was activated in the month of the column and how many remained in the following months.

For example, for the activation period of 2022-01, I had 260 sales in the month, and in the subsequent month, 128 remained active, and so on.

My problem is that it comes in whole numbers, and I would like it in percentage, starting with 100% and decreasing.

I would also like it to change color every 10% to demonstrate where I have more loss.

Does anyone have an idea of how I can do this?

Thank you.

https://drive.google.com/file/d/1mWgTNHfJk9GaG9nUi03MqwABMbrx_7fr/view?usp=sharing 

 

imagem 1.PNG

 

imagem 2.PNG

 

1 ACCEPTED SOLUTION

@RSSILVA_22

 

Thank you for your clarification.  I tweaked the measure and produced the same output as your requirement.  

Sakiko_0-1693347287623.png

The measure I tweaked which was used as the divisor of the divide function to get the percentage is as follows:

Sakiko_1-1693347401143.png

 

I attach the link to the revised file.  It is always fun to experiment with dax. 😋

https://1drv.ms/u/s!AlqFfzVTqicpnWBjDbvyKcDZCJlE?e=IjKlG1

 

View solution in original post

4 REPLIES 4
RSSILVA_22
Helper I
Helper I

Hi Sakiko 

 

Thank you for your feedback, but what I need is for the % to be for each row, with 100% starting from the first record. I've placed the first three rows in Excel to give you an idea of what I need.

regra.PNG

@RSSILVA_22

 

Thank you for your clarification.  I tweaked the measure and produced the same output as your requirement.  

Sakiko_0-1693347287623.png

The measure I tweaked which was used as the divisor of the divide function to get the percentage is as follows:

Sakiko_1-1693347401143.png

 

I attach the link to the revised file.  It is always fun to experiment with dax. 😋

https://1drv.ms/u/s!AlqFfzVTqicpnWBjDbvyKcDZCJlE?e=IjKlG1

 

Thank you, @DataNinja777 , for your prompt and effective help in resolving my question on the Power BI community forum. I appreciate it, and thank you for your time in assisting me.

DataNinja777
Super User
Super User

Hi @RSSILVA_22,

 

Thanks for sharing the download link.  I've created the % measure which you requested and prepared the visualization below in accordance with your specification.  The important thing is not to depend on the implicit measures created automatically by power BI, as they are limited in usability.  It is always better to write explicit measures in order to get maximum benefit of what dax can do.  I created 3 additional explicit measures as shown below.  

Sakiko_0-1693274832869.png

I attach the link to the updated pbix file in the link below:

https://1drv.ms/u/s!AlqFfzVTqicpnV_chPobQjl7UmQQ?e=lbJxv5

 

 

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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

Top Kudoed Authors