Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi Everyone,
I've tried to count the number of 'Providers' by Measure conditions but no luck last few days.
Can you please share your ideas?
So, a column and measures are like
Table name: Table 1
Column1 : Providers
Column2: Service Start Date
Providers | Service Start Date |
A | 22/03/2022 |
B | 14/03/2022 |
C | ---- |
C | ---- |
---- | ---- |
Table name: Table 2
Column1: Providers
Column2: Total Contracted Services
Providers | Total Contracted Services |
A | 16 |
B | 50 |
C | 98 |
D | 5 |
--- | --- |
Measures:
Target monthly =
CurrentFYMonth =
IF ( MONTH( TODAY() ) < 7, MONTH ( TODAY () ) + 6, MONTH ( TODAY () ) - 6 )
Target Services =
[Target monthly] * ([CurrentFYMonth])
Tracking A = COUNTA('Table1'[Service Start Date]) - [Target Services]
Tracking B = (Measure) -> Tracking A >= 0
I can make a table in Power BI as below in visualisation,
Providers | Tracking A | Tracking B |
A | 7 | True |
B | 12 | True |
C | -3 | False |
D | 56 | True |
E | -44 | False |
F | 0 | True |
--- | --- | --- |
I want to count the number of providers with True and False separately.
Like 46 providers on Track(True), 15 providers are below ----
Thanks,
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi,
Define the question in simple English, share some data and show the expected result.
Hello Ashish,
I've shared a sample data, and power bi file.
https://drive.google.com/drive/folders/1vwr8VnCAHtILKo9YrNz5znnz2-q2x_2f?usp=sharing
In short, I want to count how many distinct providers from both True and False to present/define either the number of on track proivders or not in Power BI.
For intance, within the data, I want to present "2 Providers are on Track", and "3 providers are below"
Hoping it makes sense.
Thanks,
Hi,
You may download my PBI file from here.
Hope this helps.
Thanks for your help!
You are welcome.
@Sparkizonebasically you are looking for dynamic segmentation, check this post and tweak it as you see fit Dynamic segmentation – DAX Patterns
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
User | Count |
---|---|
85 | |
77 | |
68 | |
49 | |
41 |
User | Count |
---|---|
111 | |
56 | |
50 | |
42 | |
40 |