Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
@Anonymous ,
Refer if these can help
https://www.daxpatterns.com/static-segmentation/
https://www.daxpatterns.com/dynamic-segmentation/
@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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
105 | |
77 | |
67 | |
63 |
User | Count |
---|---|
144 | |
107 | |
105 | |
82 | |
69 |