Forum Discussion
Power BI Measures and Slicers
- Anonymous7 years ago
Hi,
This solution works for me but what if I want my date slicer to also work for other visuals(that are depending on the the main table).As there is no relationship between date table and the main table, I can see in screenshots attached by you, that date slicer has no affect on the Total Quantity.
For me, I have created the summarized table from the main table that has date column and the 'sum of quantity' on that date.Please see that summarized table below:
Then I created the relationship between this summarized table and main table('Test' on my case). I am using the Date column of that summarized table on my date slicer.This solution has solved all the problem.
have you tried this:
Measure =
CALCULATE(
SUM('Table'[Quantity]),
ALL('Table'[Name])
)- Anonymous7 years agoNot applicable
"ALL" is not working for me.
I want to create a measure to calculate one person's % to the Total people. All people are in one slicer and date in another. I would like my card visual to show % of quantity of one person to total in a given time period but still need the measure for my Total quantity to stay the same even when I filter on Name slicer.
For some reason I can't figure out how to write the code such that I can select one person and still have my Total quantity measure be the same. It should not change even if we select any name.
- Stachu7 years ago
Community Champion
EDIT I just noticed that you posted that question in the Power query forum, not DAX. Are you trying to use DAX in the Query Editor? It doesn't seem consistent with what you wrote about the slicers, but it would explain why ALL (or anything written in DAX) doesn't work for you
In what sense ALL doesn't work? Does it give an error, or the result is different than what you expect?
Please compare these 2 and post a screenshot with and without slicer selection:Measure 1 = CALCULATE( SUM('Table'[Quantity]), ALL('Table'[Name]) )Measure 2 = SUM('Table'[Quantity])Is this table the only one in your model? If not what are the other tables, and what joins do they have with this table?
Are the slicers based on the table you posted or one of the joined tables?