powerbi-desktop

How to create a new column converting date to text

本秂侑毒 提交于 2021-02-11 15:07:44
问题 I need to create a new column with an IF . If the difference between two dates is more than a month I have to use a text-like "much time" but if it is not I have to show a date. So the date must be converted to a string to use a text column. How can I convert date to text? Fecha_real = IF( DATEDIFF(ventas[fecha_pedido]; ventas[fecha]; month) = 1 ; "much time"; ConvertToTextInSomeWay ventas[fecha] ) 回答1: This is pretty simple with the FORMAT function.. For example, FORMAT(ventas[fecha], "Short

PowerBI , change order in one column in stacked chart

限于喜欢 提交于 2021-02-11 14:14:05
问题 I am creating a Power BI report in Stacked column chart. Can I change the order in a column, just like show in the picture? Hope some masters can help me to solve the problem! 回答1: One way to achieve this is to define a custom column with values that will give you the desired sorting order, and then use Sort by column. Open Power Query Editor by clicking on Edit Queries button, and in Add Column tab click on Custom Column . To reverse the sort order, you can subtract Level from some bigger

PowerBI slicer value passing to query

六月ゝ 毕业季﹏ 提交于 2021-02-11 12:15:34
问题 I have a report generated from a SQL query, having a due date column. My requirement is to create a slicer and whatever the date a user selects in the slicer the report should show all the data where due date is less than the selected slicer date. I am not able to pass the slicer date to my SQL query. Can you guide me guys in finding the best possible way? 回答1: This is not possible in general. Slicers and filters set on a report page cannot modify the model (e.g. calculated tables or

Follow-up Dax Drop Duplicates

吃可爱长大的小学妹 提交于 2021-02-11 06:58:26
问题 Similiar to a question asked here, Given, this table, I want to only keep the records where the email appears first. email firstname Lastname Address City Zip ABC@XYZ.com Scott Johnson A Z 1111 ABC@XYZ.com Bill Johnson B Y 2222 ABC@XYZ.com Ted Smith C X 3333 DEF@QRP.com Steve Williams D W 4444 XYZ@LMN.com Sam Samford E U 5555 XYZ@LMN.com David Beals F V 6666 DEF@QRP.com Stephen Jackson G T 7777 TUV@DEF.com Seven Alberts H S 8888 <table border="1" class="dataframe"> <thead> <tr style="text

Power Bi/Dax: Summarize table with filters

杀马特。学长 韩版系。学妹 提交于 2021-02-11 06:24:05
问题 I have this table: IP Technology Status IP1 T1 Passed IP1 T1 Passed IP1 T1 Failed IP1 T2 Failed IP1 T2 Failed IP1 T2 Passed IP2 T3 Passed IP2 T3 Failed IP3 T4 Passed IP3 T4 Passed IP3 T5 Passed IP3 T5 Passed IP3 T5 Passed IP3 T5 Passed IP3 T5 Passed IP2 T6 Passed IP2 T6 Passed IP2 T6 Passed IP2 T6 Passed I have to remove some of the Technology (T2 and T6) and show the following summary table: (I am interested only in the ‘Passed’ results but left the ‘failed’ column for reference) IP Failed

Creating a Measure that returns DISTINCT COUNT by Country and Brand in Power BI

醉酒当歌 提交于 2021-02-07 19:14:45
问题 I have a table like below: Country, Advertiser, Brand, Spend C1, A1, B1, 10 C1, A1, B2, 5 C1, A2, B3, 0 C1, A2, B4, 20 C2, A1, B1, 8 C2, A1, B5, 7 C2, A2, B6, 4 C2, A2, B3, 3 C2, A2, B7, 2 C2, A3, B8, 9 I'd like to get the DISTINCT COUNT of Brands by Country, which is simply: C1 => 4 C2 => 6 How do I create a measure in Power BI that I can embed in a table or a tree-map? I have already tried this: Measure = COUNTX(DISTINCT(sourceTable),sourceTable[Brand]) which returns total Brand count (not

Creating a Measure that returns DISTINCT COUNT by Country and Brand in Power BI

旧街凉风 提交于 2021-02-07 19:11:41
问题 I have a table like below: Country, Advertiser, Brand, Spend C1, A1, B1, 10 C1, A1, B2, 5 C1, A2, B3, 0 C1, A2, B4, 20 C2, A1, B1, 8 C2, A1, B5, 7 C2, A2, B6, 4 C2, A2, B3, 3 C2, A2, B7, 2 C2, A3, B8, 9 I'd like to get the DISTINCT COUNT of Brands by Country, which is simply: C1 => 4 C2 => 6 How do I create a measure in Power BI that I can embed in a table or a tree-map? I have already tried this: Measure = COUNTX(DISTINCT(sourceTable),sourceTable[Brand]) which returns total Brand count (not

Creating a Measure that returns DISTINCT COUNT by Country and Brand in Power BI

强颜欢笑 提交于 2021-02-07 19:10:15
问题 I have a table like below: Country, Advertiser, Brand, Spend C1, A1, B1, 10 C1, A1, B2, 5 C1, A2, B3, 0 C1, A2, B4, 20 C2, A1, B1, 8 C2, A1, B5, 7 C2, A2, B6, 4 C2, A2, B3, 3 C2, A2, B7, 2 C2, A3, B8, 9 I'd like to get the DISTINCT COUNT of Brands by Country, which is simply: C1 => 4 C2 => 6 How do I create a measure in Power BI that I can embed in a table or a tree-map? I have already tried this: Measure = COUNTX(DISTINCT(sourceTable),sourceTable[Brand]) which returns total Brand count (not

Creating a Measure that returns DISTINCT COUNT by Country and Brand in Power BI

 ̄綄美尐妖づ 提交于 2021-02-07 19:08:35
问题 I have a table like below: Country, Advertiser, Brand, Spend C1, A1, B1, 10 C1, A1, B2, 5 C1, A2, B3, 0 C1, A2, B4, 20 C2, A1, B1, 8 C2, A1, B5, 7 C2, A2, B6, 4 C2, A2, B3, 3 C2, A2, B7, 2 C2, A3, B8, 9 I'd like to get the DISTINCT COUNT of Brands by Country, which is simply: C1 => 4 C2 => 6 How do I create a measure in Power BI that I can embed in a table or a tree-map? I have already tried this: Measure = COUNTX(DISTINCT(sourceTable),sourceTable[Brand]) which returns total Brand count (not

DAX : Allocate Inventory to Open Orders

╄→гoц情女王★ 提交于 2021-02-05 11:45:28
问题 I am trying to allocate inventory items to open orders in DAX, PowerBi. The idea is to allocate all the available inventory to the oldest order first, then allocate the remaining inventory to the second oldest, etc. until the inventory is depleted. The inventory can be depleted even if the open order is not completely satisfied. Please check the attached picture as an example for the allocations below I tried adding a column in the open order table using the Calculate function but the results