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
Anonymous
Not applicable

How to count oucomes of a measure

I have customers sales data of two years where I have used a mease to find in-active customers. A customer is In-Active if Sales Last Period (measure) is blank.

 

Sales Last Period = CALCULATE(
    SUM('Chemist Daily Sales'[ValueDP]),
    DATESINPERIOD('Calendar'[Date],
    LASTDATE('Calendar'[Date]),
    -1*[Period Value]*,
    MONTH))
 
*Period Value can b 3, 6, or 9 months which is coming from What-if parameter.
I want to calculate how many customers were in-active and want to display the results in Card visual. Please Advise.
 
6 REPLIES 6
AnkitBI
Solution Sage
Solution Sage

Hi - If your measure Sales Last Period is returning correct values. Then you can use something like below.

-- DimProduct[EnglishProductName] - Replace with Customer Column

 

In Active Customer = countrows(filter(all(DimProduct[EnglishProductName]),isblank([Sales Last Period])))

Thanks
Ankit Jain

Do Mark it as solution if the response resolved your problem. Do like the response if it seems good and helpful.

 

Anonymous
Not applicable

Thanks for the reply. The measure you suggested is not giving the required result. Its counting all the blank rows in my sales table. I have used the following syntext.

 

In active customer count = COUNTROWS(FILTER(ALL('Daily Sales'[Customer Name]),ISBLANK([Sales Last Period])))
 
What I actually need is that when I select the In active period and the Distributor Name (slicers), the card visual should give me count of those stores which were in active.

No such details were in your initial question. Share your PBIX file or sample with expected result. Please see below link for future queries.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Anonymous
Not applicable

Could you please see the sample data and suggest a solutioon. Its a bit urgent.

In that case. Re Register the issue as new with complete details. This I may be able to check by EOD only.
Anonymous
Not applicable

Thanks for the reply and guidence. Please see the link to sample data and pbix file. Please tell me how to count in-active customers.

 

 

https://www.dropbox.com/sh/oskyjt71nwnizj8/AABCD5H_j1VHrugPia3MKsSla?dl=0

 

Regards,

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.