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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
david40ni
Helper I
Helper I

Visualization of sales by year

 

I need to show a report like the below where I can add the year to a chart I no we have a bar chart but I am trying to figure out how I can have year as an axis against the sales ?. Also is there any visulization that would give that a plus or minus look like the item group report

 

capture sales by year.PNG

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

Hi @david40ni

Add "date" column to the Axis field in the column chart, and turn it to "Date Hierarchy", then delete "day","month","quarter", but only keep "year".

1.png

another visualization can use a table visual and then apply conditional formatting.

To get the visual below, you need create some measures

4.png

 

total applied databar = MAX([total])

flag = IF(MAX([vs])>=0,1,0)

plusorminus = IF([vs]>=0,CONCATENATE("+",[vs]),CONCATENATE("-",[vs]))

2.png

 

3.png

 

 

Reference:

desktop-conditional-table-formatting

 

dataBars

 

Best Regards

Maggie

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @david40ni

Add "date" column to the Axis field in the column chart, and turn it to "Date Hierarchy", then delete "day","month","quarter", but only keep "year".

1.png

another visualization can use a table visual and then apply conditional formatting.

To get the visual below, you need create some measures

4.png

 

total applied databar = MAX([total])

flag = IF(MAX([vs])>=0,1,0)

plusorminus = IF([vs]>=0,CONCATENATE("+",[vs]),CONCATENATE("-",[vs]))

2.png

 

3.png

 

 

Reference:

desktop-conditional-table-formatting

 

dataBars

 

Best Regards

Maggie

drewlewis15
Solution Specialist
Solution Specialist

Power BI will automatically create a date hierarchy based on your date field, so you can add that date field to the axis and get your desired result.  

 

The other visual would be a simple table with conditional formatting applied along with a measure to show the + -, which is all possible within Power BI.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.