Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello,
I have a metric that calculates the average perf for each month:
Solved! Go to Solution.
Hi, @nicolasvargas
Add a new measure as below:
Percentage =
VAR tab =
SUMMARIZE ( 'Table', 'Table'[Date], "AvgM", 'Table'[AvgM] )
VAR a =
COUNTROWS ( tab )
VAR b =
COUNTROWS ( FILTER ( tab, [AvgM] > 0 ) )
RETURN
b / a
Best Regards,
Community Support Team _ Eason
Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.
With a sample data like this;
Date | Value |
01/01/2001 | -1 |
01/01/2001 | 2 |
01/01/2001 | 3 |
02/01/2001 | -1 |
02/01/2001 | -2 |
02/01/2001 | 2 |
The first metric would help me outputing this as a result:
Date | Avg Value |
01/01/2001 | 1.33 |
02/01/2001 | -0.33 |
Now, what I would like to do is to count the number of months in which this value is over 0. In this case it should output 50%
Hi, @nicolasvargas
Add a new measure as below:
Percentage =
VAR tab =
SUMMARIZE ( 'Table', 'Table'[Date], "AvgM", 'Table'[AvgM] )
VAR a =
COUNTROWS ( tab )
VAR b =
COUNTROWS ( FILTER ( tab, [AvgM] > 0 ) )
RETURN
b / a
Best Regards,
Community Support Team _ Eason
User | Count |
---|---|
86 | |
82 | |
68 | |
66 | |
55 |
User | Count |
---|---|
123 | |
100 | |
90 | |
83 | |
66 |