Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Syndicate_Admin
Administrator
Administrator

Add Sales from the subtraction of 2 Distinctcount

That such a community, I come to consult the following:

I am putting together a report in which I have a record of the visits to the clients, but I do not have values in 0 or clients that were not visited. First of all to find out how many customers were not visited what I did was to make a measurement subtracting a Distinctcount from an excel with the total of clients and another distinctcount from the excel of Visits, where only those who were visited appear. As a result of this measure I get the number of customers who were not visited.

Here the problem; in another report I want to get the number of orders and how much those customers who were not visited add up in sales to a measure to be able to divide that value by the total. I managed as a result of a conversion of the measure mentioned in the previous paragraph to qualify as "1" those customers who were not visited, then with a table I could visualize the customers who were not visited, how many orders they made and how much money they represent in sales filtering by that measure with value "1". The problem is that I want to generate a measure to get those values out, to be able to divide them with the total value of both the number of orders and net sales and I can't find the way.

I appreciate all kinds of help, thank you!

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Good! Of course, I leave below how is the structure:

Stalemate:

  • Informed Roadmap
  • Royal visits
  • Clients
  • Sell Out
  • Sellers
  • Calendar

Based on these tables, in a report I detailed the contrast of the roadmap vs the actual visits (here I visualize who was actually visited).

Then on another page what I did to see who were NOT visited was to make a measurement calculating this: "Total customers s / visit" = DISTINCTCOUNT (Customers "Client") - DISTINTCOUNT (Real Visits "Client"), here what I get is the number of customers who were not visited then allows me to make a subtraction between the distinctive count of both and gives me the number of customers not visited. I show this by adding 2 cards with the first 2 values mentioned and another card putting the difference between the two to contrast.

This value as a result of the subtraction of these 2 values what I did was convert it to text (String): "Clients s / visit" = CONVERT(<Total clients s / visit>, ) taking the values that interest me with the number 1. I do this to be able to make under the cards a detail with the data of the customers who were not visited. With the table visualization I put Customer data and add the filter "Clients s / visit" taking the values 1 to obtain only those that were not visited and I am armed with the detail perfectly.

I made the same table but with sales, taking the net of the Sell Out table and adding in the same way that filter so that in a column it shows me how much that client bought without having visited it and here is the problem; I want to be able to have this net worth in one measure, to be able to divide it with the overall sales total and get a percentage of the total, allowing each time I select a customer to show me the corresponding individual value with the percentage of participation in the total sale.

That would be the methodology of the report, I hope I have been clear!

v-shex-msft
Community Support
Community Support

Hi @SantiagoZ,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.