- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Creating a Dynamic Calculated Column to use as chart column label
Hello,
I want to create a dynamic calculated column which will change the count of number according to my slicer selection. Currently, it showing up the total number from the dataset regardless of slicer filter selection. Like the following screenshot, every person's total case sould add up equal to 192 cases under the current slicer filter selection. However, the numbers for the each persons are showing as the aggregate total from the dataset.
here is the following Dax I wrote to make the calculated coulumn:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @lbendlin , Thanks for looking at my post. Yes, you're right that is essentially a mesure and using measure could solve my problem. However, I want to use this calculated column as an X axis for my column/bar chart. Since I cannot use measure as an X axis, I need to have either a regular column/calculated column to show my audience their relevant total amount based off of the filter selection.
I added one Power BI File , where I tried to wirte a calculated column for the sales person which supposed to ideally show the relevant number based off of the slicer selection. I also include one card visual which is showing the total sum. In that case, the total sum of all columns should match that number.
I am afraid of Power bi may not allow what I was trying to accomplish, but alternative solution with similar outcome would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you know the expected range of the measure you can use a disconnected table with the respective buckets to feed the X axis of your visual. In your case the buckets are undefined since your are adding the product count.
You may need to use a different visual , or indeed do this outside of Power BI.
Based on the sample data you provided - what would be the expected outcome?
Note: Joining on the Product Name is unfortunate. Would be better if the Sales Table had a Product Key column.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The expected outcome would match the numbers just like the table showing the breakdown of each sales person Total Product Sales. Such as Aaron should have "Aaron (6)", Abby should have "Abby (2)" etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to abandon that idea, it is not possible in Power BI. What you can do instead is put the [Total Product] measure in the tooltips.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, thanks for the reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to create a dynamic calculated column
That's called a measure.
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
05-15-2024 11:29 AM | |||
08-18-2024 10:13 AM | |||
07-29-2024 03:00 PM | |||
08-18-2024 09:59 PM | |||
04-26-2024 01:11 PM |