Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi guys,
I am working on a consignment report. One of the data set is as below. I wish to see a simple graph containing No. of goods issued, invoiced and returned in each month.
I created a date table and linked it to the dates mentioned above. However, only one relationship can be active right and that's goods issue at the moment.
Now when I plot Date on x axis against goods issue date, invoice date, return date on Y axis, I get correct GI date entries and corresponding invoice date, return date entries. I kind of understand why this is happening but not able to figure out how do I get, no. of invoices, returns in every month regardless when they were issued.
Any help would be much appreciated. Thanks!
Regards,
Shaheen
Solved! Go to Solution.
Hi @Anonymous
Create a date table but don't create a relationship between date table and your table.
Date = ADDCOLUMNS(CALENDARAUTO(),"year-month",FORMAT([Date],"YYYY Mmm"),"y-m",FORMAT([Date],"yyyy-mm"))
add columns
start_month = STARTOFMONTH('Date'[Date])
end_month = ENDOFMONTH('Date'[Date])
Create measures
good_issue =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Good Issue Date] >= MIN ( 'Date'[start_month] )
&& 'Table'[Good Issue Date] <= MAX ( 'Date'[end_month] )
)
)
invoice =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Invoice Date] >= MIN ( 'Date'[start_month] )
&& 'Table'[Invoice Date] <= MAX ( 'Date'[end_month] )
)
)
return =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Return Date] >= MIN ( 'Date'[start_month] )
&& 'Table'[Return Date] <= MAX ( 'Date'[end_month] )
)
)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Create a date table but don't create a relationship between date table and your table.
Date = ADDCOLUMNS(CALENDARAUTO(),"year-month",FORMAT([Date],"YYYY Mmm"),"y-m",FORMAT([Date],"yyyy-mm"))
add columns
start_month = STARTOFMONTH('Date'[Date])
end_month = ENDOFMONTH('Date'[Date])
Create measures
good_issue =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Good Issue Date] >= MIN ( 'Date'[start_month] )
&& 'Table'[Good Issue Date] <= MAX ( 'Date'[end_month] )
)
)
invoice =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Invoice Date] >= MIN ( 'Date'[start_month] )
&& 'Table'[Invoice Date] <= MAX ( 'Date'[end_month] )
)
)
return =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Return Date] >= MIN ( 'Date'[start_month] )
&& 'Table'[Return Date] <= MAX ( 'Date'[end_month] )
)
)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , So if date table and Join it multiple dates only one is active. So it will only run on an active date. So if the invoice date is active all data is by active date.
So if we want to change the date we need to use userelation . So that invoices run by invoice date, the issue will run by issue date.
Refer to this example how to use
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 73 | |
| 50 | |
| 47 | |
| 44 |