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 to tables sale table and calendar table In calendar table I have weeks column. I have a calculation of sales in my sales table I want to get the number of weeks based on my sales measure.
I don't want all number of weeks but only the number of weeks where sales have been made according to my calculated sales measure.
Thanks.
Solved! Go to Solution.
Hi @Anonymous
The trick is to iterate the Sales table and count the number of weeks. We can use SUMMARIZE to do that as it can access the extended table.
week count =
COUNTROWS(SUMMARIZE('Sales','Date'[Week]))
Hi @Anonymous
The trick is to iterate the Sales table and count the number of weeks. We can use SUMMARIZE to do that as it can access the extended table.
week count =
COUNTROWS(SUMMARIZE('Sales','Date'[Week]))
@PaulOlding Thanks for your reply
The thing is that sales is not a column its a calculated measure
@Anonymous The 'Sales' referenced in my measure is the name of the table with all the sales amounts (ie the fact table)
@Anonymous In that case some more information would be helpful. See this post https://community.powerbi.com/t5/DAX-Commands-and-Tips/How-to-Get-Your-Question-Answered-Quickly/m-p/1626726#M32906
User | Count |
---|---|
21 | |
14 | |
11 | |
7 | |
5 |
User | Count |
---|---|
23 | |
23 | |
20 | |
15 | |
10 |