Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
found a great tutorial on the SQL BI website that shows the differences between the options of using the ALLSELECTED function.
The first table on this page is what I'd like to reproduce in my Power BI Desktop. You can find it here: https://www.sqlbi.com/articles/the-definitive-guide-to-allselected/
I'm using a similar dataset from Microsoft, which is available here: https://github.com/microsoft/powerbi-desktop-samples/blob/main/Sample%20Reports/Sales%20%26%20Return...
I've defined the measures in very similar ways, but the ALLSELECTED function doesn't give me good results.
m_Sales_Amount =
SUMX(
Sales,
Sales[Unit] * Sales[Amount]
)
m_AllSelectedColumn =
CALCULATE(
[m_Sales_Amount],
ALLSELECTED('Customer'[Category])
)
m_AllSelectedTable =
CALCULATE (
[m_Sales_Amount],
ALLSELECTED ( 'Customer' )
)
m_AllSelectedAll =
CALCULATE (
[m_Sales_Amount],
ALLSELECTED ()
)
I'm using the Matrix visual with rows from the Customer table.
Hi @Anonymous ,
Believe that the difference between your example and the one for SQL BI is that they are using values from two different tables:
And in you case the calculations comes from the same table so they have the same result.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsYes, you are right. I found another dataset under another blog post which contains the good one.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 63 | |
| 62 | |
| 42 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 118 | |
| 106 | |
| 38 | |
| 28 | |
| 28 |