Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
547 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Software ==> | DAX (59 exercises) |
Topic ==> | Basic measures (5 exercises) |
Level ==> | Relatively easy |
Subject ==> | Power BI training |
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
Create a new Power BI file, and load the Excel workbook from the above folder; you can go to the original Electoral Commission source data from a link here or at http://bit.ly/2IPA9JS.
Create a measure to show for any filter context the total remain vote divided by the total electorate. Here's what this should show:
The first few rows of a table showing our measure by area (note that we've formatted it as a percentage).
The measure should be a simple calculation of the form SUM(X) / SUM(Y).
Too easy? Create another measure to show the total value for any filter context of the difference between the leave and remain votes, to get something like this:
Although it was only the 5th highest in the remain votes table by proportion of electorate, City of Edinburgh contributed by far the most votes to the remain cause.
Use the SUMX function to sum the expression X - Y over the Voting table, where X = the number of leave votes and Y = the number of remain votes.
Save this as Water under the bridge, then close down the Power BI instance you're using.
You can find other training resources for the subject of this exercise here:
From: | bruno.varela |
When: | 18 Sep 19 at 16:39 |
I'm very new at DAX, this are my solutions:
Measure 1 = SUM(Voting[Remain])/SUM(Voting[Electorate])
Measure2 = CALCULATE( (SUM(Voting[Leave])-(SUM(Voting[Remain]))))*0.001
Does anyone have the real ones? Or just a different way?
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.