The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi, I'm building a report that would have count rows as subtotal, not the actual sum of the values during the date period. From current view to count distinct row view, how can I manipulate to have this view?
Thank you in advance!
Current View | ||||
ID | 17-Jun | 18-Jun | 19-Jun | Total order |
123456 | 5 | 1 | 0 | 6 |
Count row view | ||||
ID | 17-Jun | 18-Jun | 19-Jun | Ordered days |
123456 | 5 | 1 | 0 | 2 |
Solved! Go to Solution.
@sunah132 , You need to create a measure that calculates the number of days with orders for each id
OrderedDays =
CALCULATE(
COUNTROWS(
FILTER(
SUMMARIZE(
TableName,
TableName[ID],
TableName[DateColumn],
"OrderCount", SUM(TableName[OrderCount])
),
[OrderCount] > 0
)
)
)
I have attached PBIX with your sample data
Proud to be a Super User! |
|
@sunah132 , You need to create a measure that calculates the number of days with orders for each id
OrderedDays =
CALCULATE(
COUNTROWS(
FILTER(
SUMMARIZE(
TableName,
TableName[ID],
TableName[DateColumn],
"OrderCount", SUM(TableName[OrderCount])
),
[OrderCount] > 0
)
)
)
I have attached PBIX with your sample data
Proud to be a Super User! |
|
Thank you! It helped exactly how I was tried to solve. 🙂
User | Count |
---|---|
70 | |
67 | |
62 | |
48 | |
28 |
User | Count |
---|---|
113 | |
77 | |
65 | |
55 | |
43 |