The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a set of data, it is a list of names of people and how many trophies they won in 2021, 2022, and 2023. I want to create a calculated Column that is the total trophies they have ever won however my problem is that I want the dashboard user to be able to select if it's 2021 and 2023 or just 2022 or 2022 and 2023. My idea to do this was to use a slicer which has values 2021,2022,2023 etc and then conditionally sum those respective record values if selected.
I have tried creating a variable for slicers which does identify what is selected but am unable to use this to select columns.
I used years = var ___slicer = SELECTEDVALUE('YearSelector'[Trophies]) which when displayed on a table drops the years not selected. How can I link this to the columns to sum
Solved! Go to Solution.
Hi, @Kieron73737
You can try the following methods.
Sample data:
Measure:
Sum = CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table','Table'[Year]))
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Kieron73737
You can try the following methods.
Sample data:
Measure:
Sum = CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table','Table'[Year]))
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |