cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SabineOussi Established Member
Established Member

Total Count with Selection

Hello,

 

I'm trying to create a table of customers, their total shipment count and an additional column to show the count of how many shipments were made with a certain priority. Priority is being filtered by a sclicer.

 

In my selection, I want to always keep the total count of all customers and only the third column changes based on the shipment type.

 

I tried having a calculated column with an IF condition on the priority or even adding the priority to the visual level filter. But this will change the values of both totals.

 

How can I achieve this?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Sebastien Member
Member

Re: Total Count with Selection

@SabineOussi,

 

I could found a workaround for your issue, It's not pretty nice looking, but I guess it works 🙂

 

I assume that you have a reference table with your customers stored in.

I've created a new column based on a formula :

 Formula.png

The formula count the number of ship (here it's a sum because I didn't create all the record),

And now, when you used if you don't select any flag type, both of the columns are the same :

Unselected.png

 

But as soon as you select a flag type, the "ship by customer" column stay the same when the other column is updated :

Selected.png

 

Hope it help you

 

Sébastien

View solution in original post

6 REPLIES 6
Sebastien Member
Member

Re: Total Count with Selection

Hello @SabineOussi

 

You should try the following formula in order to get your count without impacted by the selection 

 

MyCount = CALCULATE(DISTINCTCOUNT('Requête1'[id]);filter(ALL('Requête1');true()))

 

 

Hope it helps

 

Sébastien

SabineOussi Established Member
Established Member

Re: Total Count with Selection

Hi Sebastien,

 

It worked as a calculated measure, however it's giving me the overall total while I want the total by customer.

I tried countx but it did not work.

Sebastien Member
Member

Re: Total Count with Selection

Ok, could you just show us the data, and whitch one you want to be filtered by the slicer, and whitch one not?

 

Sebastien

SabineOussi Established Member
Established Member

Re: Total Count with Selection

Here is the data in Excel.

ttl.PNG


Shipment represents the number of shipments made.

Let's assume Flag is the value being filtered so it's in a slicer. For the sake of simplicity, it contains two value: T/F.
If T is selected, it will show the data as is, counting how many of these shipments were considered as flagged (or in my case with a certain priority I will later choose).

Your calculated field gave me the total number of shipments for all customers and the regular count worked fine for each selection. What I want is the count of each customer to still count the total and another column to count the total when filtered,

 

Any workaround?

Sebastien Member
Member

Re: Total Count with Selection

@SabineOussi,

 

I could found a workaround for your issue, It's not pretty nice looking, but I guess it works 🙂

 

I assume that you have a reference table with your customers stored in.

I've created a new column based on a formula :

 Formula.png

The formula count the number of ship (here it's a sum because I didn't create all the record),

And now, when you used if you don't select any flag type, both of the columns are the same :

Unselected.png

 

But as soon as you select a flag type, the "ship by customer" column stay the same when the other column is updated :

Selected.png

 

Hope it help you

 

Sébastien

View solution in original post

SabineOussi Established Member
Established Member

Re: Total Count with Selection

Hi @Sebastien,

 

The new column does its job on a condition that I modify the slicer interaction and make it None to my table in question. Since I'm only interested in one value for that particular page, the filtering will be unecessary.

 

Thank you!

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 177 members 1,732 guests
Please welcome our newest community members: