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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
apatwal
Helper III
Helper III

Conditional columns

Hi,

 

I have a requirement where in I have to show the trend of Revenue and other parameters in graph and table visual.

I have below columns in my dataset

Location, Invoice_Date, CustomerName, Product, Product_description, Revenue, margin, Quantity, Cost, UnitCost, UnitPrice.

 

I have date range from 1st Jan 2020 to 31st Dec 2021.

 

Now, I need to show the trend of revenue and Margin for the year 2020 and 2021 on two different columns in table visual for Revenue (Revenue 2020 and Revenue 2021) and Margin (Margin 2020 and Margin 2021), same needs to be plot in graph.

 

Also, there might be cases where a customer ABC bought and item 123 on multiple dates in both years 2020 and 2021. I need there revenue in different columns.

All the revenues for all dates are in one column, there is no separate date table.

 

Is there any way to achieve this?

 

1 ACCEPTED SOLUTION

@apatwal , I added measures for quantity, check those, same way you can create for revenue

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

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@apatwal , Put Revenue , Margain [DAte].Year or create a year column and use that viusal.

 

Bot able to get the challenge here

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

@amitchandak 

 

Please find the attached PBI sample file

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

 

I need two different columns that shows Revenue for 2020 and 2021 separately and same for other columns.

I want below structure in PBI

apatwal_0-1645778720850.png

 

There should not be any Date filter.

 

Thanks...

@apatwal , I added measures for quantity, check those, same way you can create for revenue

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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