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.
Hi my fellow power BI users, I have been wracking my head for a solution to this PBI assignment, I am pretty new to the PBI so while I was able to handle power query and all, I wanted to figure out the DAX measures for this, as this is the requirement (create measures).
So, we were asked to unpivot some fact columns causing all the metrics to be in one column and all the values in the adjacent column. Then we were asked to make a summary table by grouping segment, manufacturer and brand and then aggregate the fact columns. I didn't know how to do that without including the metric column too so I added that too.
Here, you can see how the summary table looks like and I need to create seperate measures for each that:
For the sum, I was able to come up with something like:
@Anonymous , based on what I got. A measure like
Sumx(addcolumns(summarize('Appended Table', 'Appended Table'[segment], 'Appended Table'[manufacturer]) , "_mes" ,
Switch(True() ,
max(Table[Metric]) in {"A", "B"} , SUM('Appended Table'[Metrics]) ,
COUNT('Appended Table'[Metrics])
)), [_mes])
User | Count |
---|---|
28 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
12 | |
9 | |
7 |