Forum Discussion
How to make a table count values until slicer is selected
This is my excel sheet
On my dashboard- i have 3 customers and the same items with varying conditions of either yes or no. I want it so that when no slicers for specific customers (column c) are selected - i want my table to show like below as a count of all customers":
However, when a customer slicer is selected - it will show whether the selected customer has the item via yes or no as shown in my excel sheet. Thanks. How do i do this?
- Anonymous2 years ago
Hi, derekli17001
Try the following DAX:
Measure = IF(ISFILTERED('Table'[Customer]), SELECTEDVALUE('Table'[INCLUDE]), COUNT('Table'[INCLUDE]) )In the case that no customer is selected
While choosing a customer to slice
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- ToddChittSuper User
Not sure I understand what you want. Can you give us a sample of what your expected results would look like?
- derekli17001Helper I
This is an example of what my current dashboard looks like when no slicer is selected:
When i select a customer on a slicer, i will get a respective yes or no for each item as seen below:I want it so that when there is no slicer selected - i will get a number of each item for every customer (as shown below) and will only get yes/no when a slicer is selected
I have attached the dataset i used below:ITEM INCLUDE Customer Appointment as Caltex Distributor Yes Kel Campbell Distributor Licensed Area - Selective Zone Yes Kel Campbell Sale or assignment Yes Kel Campbell Caltex Brand Yes Kel Campbell Premises Yes Kel Campbell Equipment provided Yes Kel Campbell IT System No Kel Campbell OPT software and marks Yes Kel Campbell Caltex Card Yes Kel Campbell Distributor Card Yes Kel Campbell Training Yes Kel Campbell Contribution to advertising/promotions Yes Kel Campbell Investment allowance Yes Kel Campbell Service Fee Work Yes Kel Campbell Credit/deferred payment terms Yes Kel Campbell Commission agency for Depot Front No Kel Campbell Appointment as Caltex Distributor Yes Bonney Distributor Licensed Area - Selective Zone Yes Bonney Sale or assignment Yes Bonney Caltex Brand Yes Bonney Premises Yes Bonney Equipment provided Yes Bonney IT System No Bonney OPT software and marks Yes Bonney Caltex Card Yes Bonney Distributor Card Yes Bonney Training Yes Bonney Contribution to advertising/promotions Yes Bonney Investment allowance Yes Bonney Service Fee Work Yes Bonney Credit/deferred payment terms Yes Bonney Commission agency for Depot Front Yes Bonney Appointment as Caltex Distributor Yes Geraldton Distributor Licensed Area - Selective Zone Yes Geraldton Sale or assignment Yes Geraldton Caltex Brand Yes Geraldton Premises Yes Geraldton Equipment provided Yes Geraldton IT System No Geraldton OPT software and marks Yes Geraldton Caltex Card Yes Geraldton Distributor Card Yes Geraldton Training Yes Geraldton Contribution to advertising/promotions Yes Geraldton Investment allowance Yes Geraldton Service Fee Work Yes Geraldton Credit/deferred payment terms Yes Geraldton Commission agency for Depot Front Yes Geraldton
- AnonymousNot applicable
Hi, derekli17001
You may want to consider using Bookmark, as follows:
Create a bookmark and bind it to a Button. Create two tables on the original page, one with count and one with Yes or No. Use Bookmark to record the status of All and hide another table.
To return to the status of selecting a customer, click another Button.
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- derekli17001Helper I
Is there a fomula/conditional column option rather than using bookmarks?
- AnonymousNot applicable
Hi, derekli17001
Try the following DAX:
Measure = IF(ISFILTERED('Table'[Customer]), SELECTEDVALUE('Table'[INCLUDE]), COUNT('Table'[INCLUDE]) )In the case that no customer is selected
While choosing a customer to slice
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.