Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have our distributors and their chemist sales data and want to count how many chemist were in-active in a given range (in months). For illustration I have attached the sample data and pbix file.
Please create a measue which gives the total no. of chemists (to be placed in card visual) where no sale was made (in-Active) within 3, 6, 9 or 12 months.
The period duration is coming through a measure as you can also see from the pbix file.
https://www.dropbox.com/sh/oskyjt71nwnizj8/AABCD5H_j1VHrugPia3MKsSla?dl=0
Regards,
Solved! Go to Solution.
Hi @Anonymous
Try the below measure or see the attached file.
in-active count = VAR _period = SELECTEDVALUE( 'Period (in months)'[Period (in months)] ) VAR _end = TODAY() VAR _start = DATE( YEAR( _end ), MONTH( _end ) - _period, DAY( _end ) ) VAR _active = CALCULATE( DISTINCTCOUNT( Daily_Sales[Cust_Code] ), TREATAS( CALENDAR( _start, _end ), 'Calendar'[Date] ), Daily_Sales[Value] > 0 -- remove if you want to include returns ) RETURN DISTINCTCOUNT( Daily_Sales[Cust_Code] ) - _active
Hi @Anonymous
Try the below measure or see the attached file.
in-active count = VAR _period = SELECTEDVALUE( 'Period (in months)'[Period (in months)] ) VAR _end = TODAY() VAR _start = DATE( YEAR( _end ), MONTH( _end ) - _period, DAY( _end ) ) VAR _active = CALCULATE( DISTINCTCOUNT( Daily_Sales[Cust_Code] ), TREATAS( CALENDAR( _start, _end ), 'Calendar'[Date] ), Daily_Sales[Value] > 0 -- remove if you want to include returns ) RETURN DISTINCTCOUNT( Daily_Sales[Cust_Code] ) - _active
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
104 | |
69 | |
48 | |
41 | |
34 |
User | Count |
---|---|
164 | |
112 | |
62 | |
54 | |
38 |