Forum Discussion
Matrix in PowerBi shows same values for each row
Hi MSiwek,
Thank you for the update.
The error occurs because the FILTER function in the Total Services measure references columns from multiple tables (Zmiany, SaxNames, Calendar), which isn’t allowed in a True/False expression. Let’s fix this by using variables to handle the multi-table logic.
Here’s the corrected measure:
Total Services =
VAR MinCalendarDate = MIN('Calendar'[Date])
VAR MatchingSaxNames =
CALCULATETABLE(
VALUES(SaxNames[UserId]),
SaxNames
)
RETURN
CALCULATE(
COUNT(SAX[SERVICE]),
FILTER(
Zmiany,
Zmiany[EmployeeId] IN MatchingSaxNames &&
MinCalendarDate >= Zmiany[DateFrom] &&
(ISBLANK(Zmiany[DateTo]) || MinCalendarDate <= Zmiany[DateTo])
),
TREATAS(VALUES('Calendar'[Date]), SAX[SVCDATECREATED])
)
Please update the measure and test it in your visual. Ensure "Show items with no data" is enabled to display all employees.
If this helps, kindly consider marking this response as "Accept as Solution" and giving it a "Kudos" to assist other community members facing similar challenges.
Thanks.
Hi v-ssriganesh, now measure doesn't have errors but shows values like in previous measures but it's only values matches with few groups->names and surnames. It should be about 500k total services but measure shows stil 441 total services and all of them are in 2024.01.
- v-ssriganesh1 year agoCommunity Support
Hello MSiwek,
Sorry for the delayed reply. Please consider the below steps:- Check if there is any filter affecting this visual.
- Take a table and add the fields-Zmiany[EmployeeID],Zmiany[Nazwa grupy],Zmiany[DateFrom],Zmiany[DateTo] Total Services to validate the data.
If the issue persists, can you please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot). Do not include sensitive information or anything unrelated to the issue or question. Also, show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Power-BI-Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Thank you, please continue using Microsoft Fabric community forum. - v-ssriganesh1 year agoCommunity Support
Hello MSiwek,
I am following up to see if you had a chance to review my previous response and provide the requested information. This will enable us to assist you further.Thank you.
- v-ssriganesh1 year agoCommunity Support
Hello MSiwek,
Just checking in to see if you had a chance to review my earlier message and share the requested details. Once we have that, we’ll be better equipped to help you further. Thanks.