Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi everybody,
this is my first post.
please help me,
i would like to distinct count vendorNo, with leadtime filter
here is my table
year, vendorNo, Account, Leadtime
2020 | 0007000995 | 7570004000 | 1 |
2020 | 0003000871 | 7520002000 | 1 |
2020 | 0007000316 | 7570003000 | 1 |
2020 | 0007000316 | 7520002001 | 1.5 |
2020 | 0003002554 | 7410009000 | 2 |
2020 | 0003000871 | 7520004001 | 2 |
2020 | 0003002554 | 7570001000 | 2.33333333333333 |
2020 | 0003000871 | 7570003000 | 2.35593220338983 |
2020 | 0003002554 | 7520001000 | 2.5 |
and here is my DAX :
Solved! Go to Solution.
Hi, @Kagechiyo
Please correct me if I am wrong.
I think the result should be 3.
I am not sure about how you wrote your AVGLT measure, but please kindly check the below measure if it is suitable for you.
DAXcountofVendor =
VAR removeGL =
FILTER (
SUMMARIZE (
'average lead time',
'average lead time'[vendor_No],
"avglt", AVERAGEX ( 'average lead time', 'average lead time'[Leadtime] )
),
[avglt] > 0
&& [avglt] <= 2
)
RETURN
COUNTROWS ( removeGL )
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster.
Hi, @Kagechiyo
Please correct me if I am wrong.
I think the result should be 3.
I am not sure about how you wrote your AVGLT measure, but please kindly check the below measure if it is suitable for you.
DAXcountofVendor =
VAR removeGL =
FILTER (
SUMMARIZE (
'average lead time',
'average lead time'[vendor_No],
"avglt", AVERAGEX ( 'average lead time', 'average lead time'[Leadtime] )
),
[avglt] > 0
&& [avglt] <= 2
)
RETURN
COUNTROWS ( removeGL )
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster.
thank you, @Jihwan_Kim
after some modification i manage to get what i want..
but i understand that there is another way to count the distinct.
is by grouping.
thanx=]
2020 | ;0007000995 | ;7570004000 | ;1 |
2020 | ;0003003612 | ;7520002000 | ;1 |
2020 | ;0003003638 | ;7570003000 | ;1 |
2020 | ;0007000316 | ;7520002001 | ;1.5 |
2020 | ;0003002480 | ;7410009000 | ;2 |
2020 | ;0003000871 | ;7520004001 | ;2 |
2020 | ;0003002554 | ;7570001000 | ;2.33333333333333 |
2020 | ;0003000871 | ;7570003000 | ;2.35593220338983 |
2020 | ;0003002554 | ;7520001000 | ;2.5 |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
10 | |
10 | |
9 | |
7 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
10 |