Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi guys,
i have a table with yearly product revenue and the launch year of those products:
So you see for 2018, 2019, 2020 the percentag of the total revenue that comes from products that have been launched in either 2017, 2018, 2019, 2020.
Now i want to group the launch years differently. In the graph i only want to show two groups.
1) Products <= 2 years old
2) Products > 2 years old
So for 2020 revenue the graph should group products launched in 2020 and 2019 in group 1) the rest in group 2). For 2019 -> 2019, 2018 in group 1) rest in group 2).
How can i achieve that with a measure?
Thx guys!
Solved! Go to Solution.
hi @Anonymous
You could try this way as below:
Step1:
Add a calculate column as below:
Group = IF('Table'[launchdate]='Table'[Year Sale]||'Table'[launchdate]+1='Table'[Year Sale],"group 1","group 2")
Step2:
Then when you create the visual, use the new column [Group] instead of [launchdate]
Result:
Regards,
Lin
hi @Anonymous
You could try this way as below:
Step1:
Add a calculate column as below:
Group = IF('Table'[launchdate]='Table'[Year Sale]||'Table'[launchdate]+1='Table'[Year Sale],"group 1","group 2")
Step2:
Then when you create the visual, use the new column [Group] instead of [launchdate]
Result:
Regards,
Lin
Works perfectly thanks!
@Greg_Deckler Thanks for the info. I read it and uploaded the sample file here to see the simplified datastructure i have:
@amitchandak Thanks for the link. I'm going through but can't really relate it to my problem. Any ideas may be with the example file i posted?
That would depend on you data and your formulas how you would achieve that. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.