Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I'm a Power BI noob and these forums have been invaluable in figuring out how to resolve numerous issues. The latest problem has me stumped though and hours of searching hasn't turned anything up.
What I'm trying to figure out is why my slicer shows no data in the visual when "Select All" is picked? I've posted some sample data below of what the table looks like for obligations across two Areas (East and West) and three Departments (Headquarters, Marketing, & Sales). I've created a measure that sums the Obligations and provides the cumulative total by month. Here is the DAX code:
FY22 Cumulative Execution = calculate(sum('FY22 Execution'[Oblig.]),filter(all('FY22 Execution'),'FY22 Execution'[Fiscal Month] <= max('FY22 Execution'[Fiscal Month]) && 'FY22 Execution'[Area] == SELECTEDVALUE('FY22 Execution'[Area]) && 'FY22 Execution'[Department] == SELECTEDVALUE('FY22 Execution'[Department])))
Currently, I can pick any individual option for Department and Area and the data shows up fine (example below).
But when I try aggregating all of the execution data by choosing "Select All", no data is returned in the visual
Here is the data from the FY22 Execution table if that helps (the Area and Department columns are added in Power BI and based on the specific Functional Area):
Fiscal year | Fiscal Month | Functional Area | Area* | Department* | Oblig. |
2022 | 1 | 123456SALE | East | Sales | 17,542,684.00 |
2022 | 1 | 654321HQHQ | West | Headquarters | 3,204,395.00 |
2022 | 1 | 987654MARK | East | Marketing | 12,811,038.00 |
2023 | 1 | 987654MARK | East | Marketing | 3,478,437.00 |
2022 | 2 | 123456SALE | East | Sales | 8,653,641.00 |
2022 | 2 | 654321HQHQ | West | Headquarters | -1,489,585.00 |
2022 | 2 | 987654MARK | East | Marketing | 7,691,332.00 |
2022 | 2 | 123456SALE | East | Sales | 4,265,303.00 |
2022 | 2 | 987654MARK | East | Marketing | 12,132,733.00 |
2022 | 3 | 123456SALE | East | Sales | 2,723,758.00 |
2022 | 3 | 654321HQHQ | West | Headquarters | 18,113,175.00 |
2022 | 3 | 987654MARK | East | Marketing | 19,941,798.00 |
2022 | 3 | 654321HQHQ | West | Headquarters | 1,627,687.00 |
2022 | 3 | 987654MARK | East | Marketing | 3,326,112.00 |
2022 | 4 | 123456SALE | East | Sales | -660,530.00 |
2022 | 4 | 654321HQHQ | West | Headquarters | 74,626.00 |
2022 | 4 | 987654MARK | East | Marketing | 2,115,695.00 |
2022 | 4 | 123456SALE | East | Sales | 16,243,194.00 |
2022 | 4 | 654321HQHQ | West | Headquarters | 18,588,308.00 |
2022 | 4 | 987654MARK | East | Marketing | 12,118,671.00 |
2022 | 5 | 123456SALE | East | Sales | 4,160,079.00 |
2022 | 5 | 654321HQHQ | West | Headquarters | 4,842,431.00 |
2022 | 5 | 987654MARK | East | Marketing | 6,510,183.00 |
2022 | 5 | 654321HQHQ | West | Headquarters | 16,273,608.00 |
2022 | 6 | 123456SALE | East | Sales | 11,309,438.00 |
2022 | 6 | 654321HQHQ | West | Headquarters | 12,695,390.00 |
2022 | 6 | 987654MARK | East | Marketing | 6,876,251.00 |
2022 | 6 | 123456SALE | East | Sales | 5,740,916.00 |
2022 | 6 | 654321HQHQ | West | Headquarters | 16,471,866.00 |
2022 | 6 | 654321HQHQ | West | Headquarters | 15,861,168.00 |
2022 | 6 | 987654MARK | East | Marketing | -1,789,973.00 |
2022 | 7 | 123456SALE | East | Sales | 1,910,653.00 |
2022 | 7 | 654321HQHQ | West | Headquarters | 6,179,025.00 |
2022 | 7 | 987654MARK | East | Marketing | 8,005,870.00 |
2022 | 7 | 654321HQHQ | West | Headquarters | 9,508,801.00 |
2022 | 8 | 123456SALE | East | Sales | 15,743,878.00 |
2022 | 8 | 654321HQHQ | West | Headquarters | 5,789,809.00 |
2022 | 8 | 987654MARK | East | Marketing | 16,399,780.00 |
2022 | 8 | 123456SALE | East | Sales | 6,208,686.00 |
2022 | 8 | 654321HQHQ | West | Headquarters | 9,778,786.00 |
2022 | 9 | 123456SALE | East | Sales | 1,342,227.00 |
2022 | 9 | 654321HQHQ | West | Headquarters | 11,035,011.00 |
2022 | 9 | 987654MARK | East | Marketing | 9,341,516.00 |
2022 | 9 | 654321HQHQ | West | Headquarters | 4,190,246.00 |
2022 | 9 | 987654MARK | East | Marketing | 7,771,284.00 |
2022 | 10 | 123456SALE | East | Sales | -246,182.00 |
2022 | 10 | 654321HQHQ | West | Headquarters | 7,686,851.00 |
2022 | 10 | 987654MARK | East | Marketing | 415,005.00 |
2022 | 10 | 123456SALE | East | Sales | 1,678,615.00 |
2022 | 10 | 654321HQHQ | West | Headquarters | 11,874,096.00 |
2022 | 10 | 987654MARK | East | Marketing | 5,563,839.00 |
2022 | 11 | 123456SALE | East | Sales | 3,150,280.00 |
2022 | 11 | 654321HQHQ | West | Headquarters | 4,652,000.00 |
2022 | 11 | 987654MARK | East | Marketing | -1,929,710.00 |
2022 | 11 | 654321HQHQ | West | Headquarters | 3,575,209.00 |
2022 | 11 | 987654MARK | East | Marketing | 182,394.00 |
2022 | 12 | 123456SALE | East | Sales | 4,755,511.00 |
2022 | 12 | 654321HQHQ | West | Headquarters | 318,556.00 |
2022 | 12 | 987654MARK | East | Marketing | 19,372,329.00 |
2022 | 12 | 654321HQHQ | West | Headquarters | -47,837.00 |
I'm pretty sure the issue is the filter I have in the Measure but I'm not sure how to fix it. Any ideas what the problem is?
Solved! Go to Solution.
@Jason_Walker , Try like
FY22 Cumulative Execution = calculate(sum('FY22 Execution'[Oblig.]),filter(all('FY22 Execution'),'FY22 Execution'[Fiscal Month] <= max('FY22 Execution'[Fiscal Month]) && 'FY22 Execution'[Area] in VALUEs('FY22 Execution'[Area]) && 'FY22 Execution'[Department] in VALUEs('FY22 Execution'[Department])))
or
FY22 Cumulative Execution = calculate(sum('FY22 Execution'[Oblig.]),keepfilters( filter(all('FY22 Execution'),'FY22 Execution'[Fiscal Month] <= max('FY22 Execution'[Fiscal Month]) && 'FY22 Execution'[Area] in VALUEs('FY22 Execution'[Area]) && 'FY22 Execution'[Department] in VALUEs('FY22 Execution'[Department]))))
or use treat as for the two slicer where I have used in
https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/
@Jason_Walker , Try like
FY22 Cumulative Execution = calculate(sum('FY22 Execution'[Oblig.]),filter(all('FY22 Execution'),'FY22 Execution'[Fiscal Month] <= max('FY22 Execution'[Fiscal Month]) && 'FY22 Execution'[Area] in VALUEs('FY22 Execution'[Area]) && 'FY22 Execution'[Department] in VALUEs('FY22 Execution'[Department])))
or
FY22 Cumulative Execution = calculate(sum('FY22 Execution'[Oblig.]),keepfilters( filter(all('FY22 Execution'),'FY22 Execution'[Fiscal Month] <= max('FY22 Execution'[Fiscal Month]) && 'FY22 Execution'[Area] in VALUEs('FY22 Execution'[Area]) && 'FY22 Execution'[Department] in VALUEs('FY22 Execution'[Department]))))
or use treat as for the two slicer where I have used in
https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/
The first DAX formula worked great. Thanks for your help!
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
93 | |
88 | |
35 | |
35 |
User | Count |
---|---|
154 | |
101 | |
80 | |
63 | |
54 |