Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi Team,
Hope all are doing good. Need your help to resolve a query. I have a table having Month, Personal_ID, worktime columns. Based on month selection i want to bring last 3 months userid who have recorded worktime less than 6 hours. In this regard i have done and plotted into matrix table, but only thing i need to eliminate the Blank cell value.
In the above December 2024 month is selected, hence it displayed last 3 months Oct to Dec 24 personal id having Worktime less than 6 hours, but i want those users who are having value for all 3months less than 6 hours. I want to exclude those blank cell values Could you please .help to resolve this!
Below given the DAX code which i am using to get this.
-----
Please provide sample data that would completely cover your question instead of a screenshot of a visualization chart. If possible, sharing your pbix file is best (Remove sensitive data).
Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-xianjtan-msft ,
I would definitely share but office firewall does not allow me to share. Even i will provide you the link to download, you won't be able dowload due to firewall restriction. Is there any other way to share the sample file here!
Regards,
Sagar
You can upload files to a cloud storage (e.g. OneDrive or Google Drive, etc.) and paste the link to that storage location into the post.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Jarvis Tang
Hi @sagarsahoo_123 ,
You need to exclude users with blanks and ensure that only those with worktime < 6 hours for all three months are displayed. Modify your DAX measure as follows:
Last_3M_WT =
VAR max_date = MAX(FY_Calendar[Date])
VAR PreviousDates = DATESINPERIOD(FY_Calendar[Date], max_date, -3, MONTH)
VAR Result =
CALCULATE(
[Avg WT],
FILTER(
VALUES(VW_ARC_SKILL[Personal_ID]),
COUNTROWS(
FILTER(
VW_ARC_SKILL,
VW_ARC_SKILL[WorkTime] < 6 &&
VW_ARC_SKILL[Date] IN PreviousDates
)
) = 3 -- Ensures all 3 months have values
)
)
RETURN Result
Step 2: Ensure Avg WT is Defined Properly
Avg WT = AVERAGE(VW_ARC_SKILL[WorkTime])
"The goal is to turn data into information, and information into insight." – Carly Fiorina
🔗 Need Power BI help? Connect on LinkedIn: Rohit Kumar’s LinkedIn
Hi @rohit1991 ,
Thanks for your support, but i am not getting the desired result. Please find the below screenshot after applying code suggested by you.
But i am expecting to show last 3months along with Worktime value in all month like below 1st row.
Please guide if anytthing else needs to be done!
Regards,
Sagar
Can you please provide non-sensitive sample data?
Proud to be a Super User!
Paul on Linkedin.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
78 | |
40 | |
40 | |
35 |