Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
magcl
New Member

compare values from a matrix

Hello everyone,

 

My question is rather basic for those who master Power BI (this is not my case yet 😞) :


I have a simplified dataset with a number of an agent and a date on wich a certain task was performed :

 

agentdatenum_taches
Ag105/01/20231
Ag117/01/20231
Ag107/02/20231
Ag203/01/20231
Ag219/01/20231
Ag219/02/20231
Ag319/01/20231
Ag105/03/20231
Ag219/03/20231
Ag308/03/20231

 


I also have a table of dates to facilitate the management of dates:

 

dateanneemoisjournom_jour_semainenom_moisno_semnom_no_semaineno_trimestrenom_no_trimestreweekend
01/01/2023 00:00202311DimancheJanvier1S11T11
02/01/2023 00:00202312LundiJanvier1S11T10
03/01/2023 00:00202313MardiJanvier1S11T10
04/01/2023 00:00202314MercrediJanvier1S11T10
05/01/2023 00:00202315JeudiJanvier1S11T10
06/01/2023 00:00202316VendrediJanvier1S11T10
07/01/2023 00:00202317SamediJanvier1S11T11
... etc         1

 

-There is a relationship between two tables with the 'date' field-

I need to check if each agent performs a task at least once a month. This means that in March an agent must reach the accumulation of 3 tasks not to be 'late'.

 

So far I managed to create a sum of the tasks :

sum_tache = sum('my_table'[num_taches]

 

... and then make the cumulation :

cum_tache = CALCULATE('my_table'[sum_tache], DATESYTD(('my_calendar'[date])))
 
...which gives the following result on the visual matrix:
Capture.PNG
 
Q1: I would like the date to be displayed in month format, but when I choose the 'month' field from my 'date' table, the cumulation of values does not work.
 
Last problem: I need my matrix to display in a binary way if the cumulation for a given month is equal to the month, e.g. for ag_3
For January: he performed 1 tasks so we display "1"
For February: its cumulation is equal always at 1 so we display "0"
For March: it has performed 1 task - its cumulation is at 2 - so we display "0" (it should be at 3)
 

Q2 : So my question is - is it possible to compare the cumulative values with an int value that represents the month concerned?

 

Thank you in advance for your help.

Best regards,

 

Mag Cle

 

 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@magcl , if you select month year, then it should work

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...

 

Or try window function

Continue to explore Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc

 

Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @magcl,

Time intelligence function does not support to handle aggregate values, perhaps you can try to use date function extract the current date and use this as conditions to calculated with your expressions:

Time Intelligence "The Hard Way" (TITHW)  

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@magcl , if you select month year, then it should work

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...

 

Or try window function

Continue to explore Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc

 

Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

Top Kudoed Authors