The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I'll try to better explain the title here:
I have a dataset as you can see below (sample).
I want to create a visual (barchart, table) shows the frequency of positive and negative for each month, for each ID.
The visual should only include rows that have a value in January.
In the sample data, ID 1 and 2 both have values for January. ID 3 does not.
The visual should exclude ID 3, and present ID 1 and 2s positive and negative values for all months.
ID | Month | Positive | Negative |
1 | January | 4 | 5 |
1 | February | 5 | 4 |
1 | March | 7 | 3 |
1 | April | 10 | 2 |
2 | January | 7 | 7 |
2 | February | 8 | 3 |
2 | March | 10 | 1 |
2 | April | 12 | 1 |
3 | February | 5 | 5 |
3 | March | 5 | 4 |
Is there an easy way of doing this, or is complex DAX required?
Solved! Go to Solution.
Hi @prebenolsen,
I have a solution here:
I created a calcualted column so I could use it in the visual as a filter:
The code is as follows:
IDContainsJanuaryFilter = VAR _list = SUMMARIZE ( FILTER ( Table12, Table12[Month] = "January" ), [ID] ) RETURN IF ( Table12[ID] IN _list, 1, 0 )
Does this work for you? 🙂
/Tom
https://www.instagram.com/tackytechtom
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
Hi @prebenolsen,
I have a solution here:
I created a calcualted column so I could use it in the visual as a filter:
The code is as follows:
IDContainsJanuaryFilter = VAR _list = SUMMARIZE ( FILTER ( Table12, Table12[Month] = "January" ), [ID] ) RETURN IF ( Table12[ID] IN _list, 1, 0 )
Does this work for you? 🙂
/Tom
https://www.instagram.com/tackytechtom
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
User | Count |
---|---|
77 | |
77 | |
36 | |
30 | |
28 |
User | Count |
---|---|
107 | |
100 | |
55 | |
49 | |
45 |