The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I would like to make a visual to compare all data with the data of an selected filter. I thougt I would do this with a measure. This is my measure for all data:
Solved! Go to Solution.
Then you need to create a 2nd measure. Keep your original measure for filtering per Subject.
Use this for the whole Average
Average All =
VAR _AllMistakes = CALCULATE(SUM('Technical Research'[Number of Mistakes]), ALL ('Technical Research'))
VAR _AllSubjects = CALCULATE(COUNT('Technical Research'[Subjects]), ALL ('Technical Research'))
RETURN
DIVIDE(_AllMistakes, _AllSubjects, 0)
Change Count to Distinctcount if you are looking for unique number for teh subjects.
Add both measures to the Visual
Joe
Proud to be a Super User! | |
Date tables help! Learn more
Hi @Noadekat
Your measure looks good, but have you tried adding a slicer with the subjects on the page? When you choose a subject, the measure will automatically filter to the Average of that Subject. Also in a Table visual, you can add the subjects and your measure and it will also filter to the Average.
Is that what you need? Maybe provide a clearer example?
Thanks
Joe
Proud to be a Super User! | |
Date tables help! Learn more
Hi!
Thankyou for your answer. The problem is that I want both averages in one visual, so the average of all subjects ánd the average of only one subject. In that way you can compare them to eachother. If I make a slicer, the slicer will effect both lines.
Then you need to create a 2nd measure. Keep your original measure for filtering per Subject.
Use this for the whole Average
Average All =
VAR _AllMistakes = CALCULATE(SUM('Technical Research'[Number of Mistakes]), ALL ('Technical Research'))
VAR _AllSubjects = CALCULATE(COUNT('Technical Research'[Subjects]), ALL ('Technical Research'))
RETURN
DIVIDE(_AllMistakes, _AllSubjects, 0)
Change Count to Distinctcount if you are looking for unique number for teh subjects.
Add both measures to the Visual
Joe
Proud to be a Super User! | |
Date tables help! Learn more
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |