Can you have a card with calculated rows that have different data types under one column?
I have a financial report that shows:
Row: 1 Gross Retail Revenue ($ value)
Row 2: Retail Discounts ($ Value)
Row 3: % Retail Discount = Retail Discounts/ Gross Retail Revenue (% Value)
Row: 4 Gross Wholesale Revenue ($ value)
Row 5: Wholesale Discounts ($ Value)
Row 6: % Wholesale Discount = Wholesale Discounts/ Gross Wholesale Revenue (% Value)
While I was able to create a SQL transformation to get the calculations, the card requires a column to have only one data type ($ or %). I need this report to be formatted with these rows having different data types. Any help is greatly appreciated.
Thanks!
Answers
-
some cards under "general settings" have an option to "transpose" the data.
but in general
1) don't preaggregate your data using SQL, this will limit your ability to filter your data. instead try to use beast modes in analyzer as a surrogate for SQL aggregation
2) in one column, percent and currency are both numeric data types, so what you want to do is change formatting, which is a display question (use a CASE statement and build in the logic for a formatting string.)
something like this, https://youtu.be/YgevJkjeFqw?t=644 will get you started.
good luck!
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
Hi @user074136
Domo doesn't allow for different data types in the same column. To get around this you can utilize a beast mode to customize the formatting of each row manually with several CASE statements:
CASE WHEN `row name` = 'Gross Retail Revenue` THEN CONCAT('$', ROUND(`value`, 2)) WHEN `row name` = '% Retail Discount', THEN CONCAT(ROUND(`value`, 2), '%') ... END
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
@GrantSmith I have tried this approach, but this turns the data column into a text column and because I'm using a pivot table, the values section in this type of table has to be a numeric data type.
0 -
You'd need to pivot your data yourself then outside of a pivot table card (using a dataflow or other mechanism) and utilize a standard table card with your pivoted data
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
@GrantSmith Thank you!
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 101 SQL DataFlows
- 622 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 748 Beast Mode
- 59 App Studio
- 41 Variables
- 686 Automate
- 176 Apps
- 453 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 396 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 125 Manage
- 122 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 109 Community Announcements
- 4.8K Archive