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.
Hi,
I'm trying to create a measure that returns the total cost of all rows in a timesheet table in a given period. I created a date table that connects to the timesheet table (UrenOmzet) on the date of the rows.
SUMX( FILTER( ALLEXCEPT(UrenOmzet;'Date'[Date]); UrenOmzet[activiteit_oid] <> "0C31547C-BA9D-474B-87DD-F52F2825B31B" && UrenOmzet[activiteit_oid] <> "FDF01697-B35A-47AF-A91D-CFD4F2BA6C2E" ); UrenOmzet[Uren- geschreven] * UrenOmzet[Kostprijs - per uur] )
For some reason the ALLEXCEPT function does not seem to work on the date value. Any ideas on what could be the problem here?
Solved! Go to Solution.
Hi @Anonymous,
Based on my test, you could refer to below formula:
Sample data:
Create a measure:
b = CALCULATE(SUMX('Table1',[NUMBER]*[WEIGHTED]), FILTER(ALLEXCEPT('Table1','Table1'[Date]), [Item] <> "C" && Table1[WEIGHTED] <> 63))
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi @Anonymous,
Based on my test, you could refer to below formula:
Sample data:
Create a measure:
b = CALCULATE(SUMX('Table1',[NUMBER]*[WEIGHTED]), FILTER(ALLEXCEPT('Table1','Table1'[Date]), [Item] <> "C" && Table1[WEIGHTED] <> 63))
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
@Anonymous
ALLEXCEPT is meant to be used more a filter argument than as a table
try like this:
= CALCULATE ( SUMX ( UrenOmzet, UrenOmzet[Uren- geschreven] * UrenOmzet[Kostprijs - per uur] ), ALLEXCEPT ( UrenOmzet, Date ), NOT UrenOmzet[activiteit_oid] IN { "0C31547C-BA9D-474B-87DD-F52F2825B31B", "FDF01697-B35A-47AF-A91D-CFD4F2BA6C2E" } )
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
This leaves me with the same problem. It seems as if the date table does not filter the dates in the UrenOmzet table whenever I filter the date table on year or month. I did mark my date table as a date table, but the hierarchy does not seem to work as expected. Is there a known solution to this problem?
Do you have an active relationship between the two tables ?
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Yes there is an active one(Date) to many(UrenOmzet) relationship
THe filter on date should stay, maybe you can share your pbix file
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
147 | |
85 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |