March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi everyone....
I have two problems with one card:
First: I have a mesure that is the sum of all values
of one table with all partners, however I have another table which has exclusive Partners that is used an a Filter on my dashboard, the purpose of that is because when the user select whatever value of the Filter (Table 1), the result (card) must be 0. However, I got the the result only when just one value is selected but when is selected more than 1 (multiple chocies), it doesn't work (it shows the total value from the another table).
Table 1
Exclusive Partners |
A |
B |
C |
created measure = IF(HASONVALUE('Table1'[Organization],0, measure)
----.*Measure* is the sum of another table.
Example: when any value is selected, the total sum is:
1000 |
Example: when Orga A value is selected, the total sum is:
0 |
**and that is right, the desired value
Problem: when Orga A and B or more values are selected, the total sum is:
1000 |
**and that is wrong, because it must be "0"
Second: when the same filter "Exclusive Partners" is selected as "Select all" it doesn't filter anything because the graphic doesn't change, only changes when is selected one by one or multiple choices. The graphic shows the sum of all Partners (normal Partners and Exclusive Partners). As you can see on the next picture: 1* none is selected, 2* when "Select all" is choiced and 3* when one by one of all Filter is selected. I would like the "Select all" works properly.
I hope your support 🙂
Thanks
Solved! Go to Solution.
Hi @gkarlo ,
The syntax you use is HASONEVALUE this means that if you only select A you get the 0 but when you select A & B you are selecting more than one value you do not have 1 single selection so you get the 1000.
In this case you should use the ISFILTERED option:
created measure = IF(ISFILTERED('Table1'[Organization]),0, measure)
Be aware that using this syntax if you have selected all the values it means that it's filtered so if you only want to have the values when all the organizations are selected you can redo your measure to something similar to this
created measure =
var _TotalOrganizations = COUNTROWS(ALL('Table1'[Organization]))
Return
IF(IF(COUNTROWS(VALUES'(Table1'[Organization])) <> _TotalOrganizations,0, measure)
Concerning the second part of the question not sure If I understand what you want to achieve can you please give some more context.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @gkarlo ,
For the 1st question, In your DAX you are saying using HASONEVALUE() that if One Value is selected, return 0, else return 1000. This is why when more than 1 value is selected, it is returning 1000.
For the second question, there are few things that you need to check.
1. How is your exclusive partners table restricting the data flowing from All Partners table? One way to achieve this is to create a relation ship between Exclusive Partners to All Partner with exclusive partners filter all partners table. Your slicer should use the Exclusive Partner in your slicer. This way when select all is selected, your data coming from all partners also gets filtered to the same.
2. We are not clear about from where the no that you are displaying in the bars is flowing. If it is flowing from all partners table, then doing step 1 will take care of it. If it is coming from a different table, we might need to have relationship between exclusive partners table and the other table from where your orders flow
If this doesn't solve the issue, you may have to share more information on your issue.
Regards,
Hi @gkarlo ,
The syntax you use is HASONEVALUE this means that if you only select A you get the 0 but when you select A & B you are selecting more than one value you do not have 1 single selection so you get the 1000.
In this case you should use the ISFILTERED option:
created measure = IF(ISFILTERED('Table1'[Organization]),0, measure)
Be aware that using this syntax if you have selected all the values it means that it's filtered so if you only want to have the values when all the organizations are selected you can redo your measure to something similar to this
created measure =
var _TotalOrganizations = COUNTROWS(ALL('Table1'[Organization]))
Return
IF(IF(COUNTROWS(VALUES'(Table1'[Organization])) <> _TotalOrganizations,0, measure)
Concerning the second part of the question not sure If I understand what you want to achieve can you please give some more context.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks Felix, that was helpful and it worked properly 🙂.
Related to the second issue, the Filter that I have, it comes from Table Organization (exclusive Partners-EP) and it has a relation connection with the main table in order to Filter by EP.
However, when any value is selected, the graphic show all total orders from all Partners, and that is okay as you can see in picture 1. However, when the Filter Exclusive-Partner is as "Selected All", the graph's values doesn't change anything as Pic-2. But when I select one by one all values from the Filter, I get the right values that should be shown on the graphic. Pic-3.
*Hint: The Exclusive Partner Filter has a behind filter to hide Blank option, that is for the relation between tables cause I don't like to show that option on the slicers, in case not find a solution, I wonder if there is an option to rename Blank as i"Normal Partners".
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
146 | |
97 | |
79 | |
69 |