Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi good day,
Can pls someone help me on how can I achieved the output i desired on my table below.
Thank you
Solved! Go to Solution.
Thanks for the reply from Irwan , please allow me to provide another insight:
Hi, @AllanBerces
The solution provided by Irwan, using a calculated column, is a good idea.To facilitate your understanding, I have created the following example. Please refer to the attached PBIX file in the post.
If you need it as a measure, you can refer to the following code:
Count measure =
COUNTX (
FILTER (
ALLSELECTED ( 'Table01' ),
'Table01'[Trade] = MAX ( 'Table01'[Trade] )
&& 'Table01'[Status] = MAX ( 'Table01'[Status] )
),
'Table01'[Trade]
)
The output is as follows:
You can also try the following calculated column:
Count1=
CALCULATE (
COUNTROWS ( 'Table01' ),
FILTER (
ALLSELECTED ( 'Table01' ),
'Table01'[Status] = EARLIER ( Table01[Status] )
&& 'Table01'[Trade] = EARLIER ( 'Table01'[Trade] )
)
)Count2 =
CALCULATE (
COUNTROWS ( 'Table01' ),
ALLEXCEPT ( 'Table01', Table01[Status], 'Table01'[Trade] )
)
Here's my final result, which I hope meets your requirements.
Best Regards,
Leroy Lu
Thanks for the reply from Irwan , please allow me to provide another insight:
Hi, @AllanBerces
The solution provided by Irwan, using a calculated column, is a good idea.To facilitate your understanding, I have created the following example. Please refer to the attached PBIX file in the post.
If you need it as a measure, you can refer to the following code:
Count measure =
COUNTX (
FILTER (
ALLSELECTED ( 'Table01' ),
'Table01'[Trade] = MAX ( 'Table01'[Trade] )
&& 'Table01'[Status] = MAX ( 'Table01'[Status] )
),
'Table01'[Trade]
)
The output is as follows:
You can also try the following calculated column:
Count1=
CALCULATE (
COUNTROWS ( 'Table01' ),
FILTER (
ALLSELECTED ( 'Table01' ),
'Table01'[Status] = EARLIER ( Table01[Status] )
&& 'Table01'[Trade] = EARLIER ( 'Table01'[Trade] )
)
)Count2 =
CALCULATE (
COUNTROWS ( 'Table01' ),
ALLEXCEPT ( 'Table01', Table01[Status], 'Table01'[Trade] )
)
Here's my final result, which I hope meets your requirements.
Best Regards,
Leroy Lu
hello @AllanBerces
please check if this accomodate your need.
Count =
COUNTX(
FILTER(
'Table',
'Table'[Trade]=EARLIER('Table'[Trade])&&
'Table'[Status]=EARLIER('Table'[Status])
),
'Table'[Trade]
)
Hope this will help.
Thank you.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 30 | |
| 23 |