- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Comparing between different filters on the same data
Please, I need to compare results of the same measure (Conteo Clientes = DISTINCTCOUNT (hVentas[id cliente])) affected by two distinct filters in the same page. For example, in filter 1, its choosen, product Apples, and the result for "Conteo Clientes" which buyed Apples is 900, in the Filter 2, its choosen product Oranges, and the result for another card of "Conteo Clientes" related to filter 2 is 600, now I want to use these two results to calculate basic operations as sum, diference, porcentage, etc. Do you know how to do it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Gilbert, I hope you can find a way :). So far its ok for me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you had some sample data that would be ideal.
What I could think of off the top of my head would be to create 2 measures where each measure is looking at the specific slicer.
Once you have got the 2 measures you could then do additional measures as you described above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gilbert, I tried it, thank you for your post.
Yes, in fact, to explain my self better I've created an example you can see in the next link:
https://drive.google.com/drive/folders/1CTzERtALqe0wOccLCvqjZYglbgjdGrMH?usp=sharing
You can see I have a fact table fSales, and two dimension tables: dProduct and dCustomer. What I want to do is to have two sides with independent filters to chose sales of one product in each side, for example, if in the left I choose Product 4, then it says I've sold 365 units, in the other hand at right if I choose Product 2, it says that the quantity sold is 302, until here is ok. But now, I want to have in the middle the difference between those two quantities, in this case is 63. My problem is that I don't know how to capture result 1 and result 2 to do operations, since both are from the same table.
Hope this to be more clear, thank you
Image 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @LarBo
I had a look at the PBIX that you sent and I have created a DAX measure that will look at the 2 values in the single slicer and then calculate the difference between them.
What I did was to find the first selection and calculate the quanity.
I then found the second selection and calculated the quanity for this one also.
And then finally I subtracted the two values.
Here is a link to the PBIX: https://1drv.ms/u/s!Apxn-69XhcAmiO9LToMxVVSpPXUTlA
Please let me know if this works as it is something I would like to blog about.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gilgert, it's really intersant what you did :).
What you did was very interesting, congratulations! You took the highest selection as the first number and the lowest one with the second number. Thank you so much.
However, my users want to have a separate filter for each of the products, because below they will have a detail per customer that bought each item and have everything in one, although it works, it will not be very practical, is it possible to do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the kind words
As far as I can currently see I cannot think of a way to have separate slicers to filter the data and measures.
I will think about it some more, but off the top of my head I am not sure if it can be done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Gilbert, I hope you can find a way :). So far its ok for me

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
11-20-2023 05:13 AM | |||
06-21-2024 09:03 AM | |||
02-16-2024 10:05 AM | |||
07-04-2024 04:53 AM | |||
03-20-2024 02:49 AM |
User | Count |
---|---|
141 | |
115 | |
84 | |
63 | |
48 |