Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I am using the Matrix Visual to display 2 dimensional data. In the columns I have Month and in the Rows I have the url's visited by the user. The values section shows the count of distinct users who have visited a particular url in the month. However I am now looking to create another column to show the % difference in the number of distinct user going up and down for each url. For example the data looks like this
Jan Feb
Home 20 40
Product 10 30
How can I add a % difference column. In Excel this can be easily achieved by referencing the cell. Is there a similar way to achieve this in DAX ?
DAX has no concept of cells, but it does have a concept of Rows. You could probably add a calculated column something like this:
FebChangePercent = DIVIDE(<data_table_name>[<jan_data_column>],
<data_table_name>[<feb_data_column>])
You would have to write a calculated column for each pair of months you want to calculate the percent of change for.
I did not address the order you want to do the division in or the formatting of the result.
Help when you know. Ask when you don't!
If you are using measures to calculate the totals in your rows, then you can use the measure names instead of the table_name[column_name] syntax i showed.
FebPercentChange := FORMAT(
DIVIDE( Jan_total, Feb_total,0),
"percent"
)
Help when you know. Ask when you don't!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
19 | |
19 | |
15 | |
15 |
User | Count |
---|---|
49 | |
26 | |
22 | |
17 | |
16 |