Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have 3 tables: Colour, Category, FactSales:
I have to create measure, to Sum amount of "Red" sales. Every row should display this value.
I tried to do it:
I expect to get 20 in each row. How can I create measure correctly and combine two ALL() functions for two tables?
Solved! Go to Solution.
@Anonymous -
Does this accomplish your request?
MeasureRed = CALCULATE ( [Measure], ALL ( FactSales ), Colour[Colour] = "Red" )
Proud to be a Super User!
What's happening is that, looking at the first line in your "both fields" example,
Cross is filtering out 4 rows from factsales
then red filters, from within those rows, one row of red...whose amount is 6, which is what you see in your table.
So as well as getting All() from the color table, you need to get ALL() from the fact table
something like
MeasureRed = CALCULATE( [Measure];ALL(FactSales); FILTER(ALL(Colour); Colour[Colour] = "Red" ) )
Help when you know. Ask when you don't!
What's happening is that, looking at the first line in your "both fields" example,
Cross is filtering out 4 rows from factsales
then red filters, from within those rows, one row of red...whose amount is 6, which is what you see in your table.
So as well as getting All() from the color table, you need to get ALL() from the fact table
something like
MeasureRed = CALCULATE( [Measure];ALL(FactSales); FILTER(ALL(Colour); Colour[Colour] = "Red" ) )
Help when you know. Ask when you don't!
@kentyler wrote:MeasureRed = CALCULATE( [Measure];ALL(FactSales); FILTER(ALL(Colour); Colour[Colour] = "Red" ) )
Thank you. This is exact what I want.
@Anonymous -
Does this accomplish your request?
MeasureRed = CALCULATE ( [Measure], ALL ( FactSales ), Colour[Colour] = "Red" )
Proud to be a Super User!
@ChrisMendoza wrote:@Anonymous -
Does this accomplish your request?
MeasureRed = CALCULATE ( [Measure], ALL ( FactSales ), Colour[Colour] = "Red" )
Yes. It works perfect. Thank you!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
116 | |
82 | |
45 | |
42 | |
28 |
User | Count |
---|---|
182 | |
82 | |
71 | |
48 | |
45 |