Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi
I hope somebody can help me.
Question:
How many order were open per month.
I have a date table - Calendar(Date) that has an active relationship with Open.
Data set
| ID | Open | Close |
| 1 | 15-Jan-21 | |
| 2 | 20-Feb-21 | 20-Mar-21 |
| 3 | 01-Jan-21 | 20-Mar-21 |
| 4 | 10-Jan-21 | 28-Apr-21 |
Answer should be:
| Feb-21 | 4 |
| Mar-21 | 2 |
| Apr-21 | 1 |
I tried countrows and filter, but cannot get it to work.
This does not work:
Open = Calculate(CountA('Position Open'[ID]),Filter('Position Open',(Month(‘Position Open’[Open])<=Calendar(Month) && Year(Position Open’[Open])<=Calendar(Year) && isempty('Position Open'[Close]) || Month('Position Open'[Close]) > Calendar(Month) && Year(Position Open’[Position Open Date])>Calendar(Year))
Thanks for any suggestions.
Solved! Go to Solution.
you can modify the measure by adding ALL function
Measure =
CALCULATE(COUNTROWS('Table'),FILTER(all('Table'),('Table'[Close]>max('Date'[Date])||ISBLANK('Table'[Close]))&&'Table'[Open]<max('Date'[Date])))
pls see the attachment below
Proud to be a Super User!
@Ryks
Take a look at these two Quick Measures as I think you want something like them.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365
Great solution.
I however, have relationships on my table.
Active - Open to Calendar Date and inactive with Close.
you can try this
Measure =
CALCULATE(COUNTROWS('Table'),FILTER('Table',('Table'[Close]>max('Date'[Date])||ISBLANK('Table'[Close]))&&'Table'[Open]<max('Date'[Date])))
pls see the attachment below
Proud to be a Super User!
you are welcome
Proud to be a Super User!
Hi @ryan_mayu
The reason why my data does not work, is that I have a active relationship between calander date and inactive relationship between calander date and close. I am playing around with
you can modify the measure by adding ALL function
Measure =
CALCULATE(COUNTROWS('Table'),FILTER(all('Table'),('Table'[Close]>max('Date'[Date])||ISBLANK('Table'[Close]))&&'Table'[Open]<max('Date'[Date])))
pls see the attachment below
Proud to be a Super User!
you are welcome
Proud to be a Super User!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 50 | |
| 44 | |
| 42 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 69 | |
| 32 | |
| 32 | |
| 32 |