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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.